title: How to delete axis label for just one tick in matplotlib
body: <p>I am plotting up several adjacent panels with matplotlib.  I have the problem that some of the axis labels overlap where the panels meet.  A minimum working example and sample image follow.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  fig = plt.figure(figsize=(4,8))
  ax1 = fig.add_axes([.25,.5,.5,.25])
  ax2 = fig.add_axes([.25,.25,.5,.25])
  
  ax1.set_xticklabels([])
  
  fig.savefig("temp.pdf")
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/JkOKy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JkOKy.jpg" alt="enter image description here"></a></p>
  
  <p>As you can see in the image, the 0.0 of the top panel and the 1.0 of the bottom panel are in the same place.  I am trying to get the 1.0 of the bottom panel to not show up but still have the remaining labels on the axis show up.  Nothing I've tried has worked.  Things I have tried:</p>
  
  <pre><code>#This just doesn't do anything
  from matplotlib.ticker import MaxNLocator
  ax3.xaxis.set_major_locator(MaxNLocator(prune='upper'))
  
  #This produces the image shown below
  labels = [item for item in ax2.get_yticklabels()]
  labels[-1].text = ''
  ax2.set_yticklabels(labels) 
  
  #This also produces the image shown below
  labels = ax2.get_yticklabels()
  labels[-1].set_text('')
  ax2.set_yticklabels(labels) 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/paG83.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/paG83.png" alt="enter image description here"></a></p>
  
  <p>The image above is produced by the last two of the three blocks of code immediately before the image.  The strange y-axis labels occur whether or not the line <code>labels[-1].text = ''</code> is included.</p>