title: Last minor tick not drawn - Pyplot
body: <p>So I'm trying to draw two subplots in the same figure that share the x axis. However, I cannot get it to draw the last minor xtick. I have no idea from where this behaviour comes, but I managed to reproduce it with random data. </p>
  
  <p>The system used is python2.7 and matplotlib v1.2.1</p>
  
  <p>So here goes my minimal error-reproducing example:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.gridspec as gridspec
  from matplotlib.ticker import MaxNLocator
  
  xdat = np.linspace(0,6.6,endpoint=True)
  ydat1 = np.random.rand(50)*500
  ydat2 = np.random.rand(50)*4
  
  fig = plt.figure(figsize=(6,8), dpi=72)
  gs = gridspec.GridSpec(2,1, height_ratios=[3,1])
  fig.subplots_adjust(hspace=0.0)
  ax1 = plt.subplot(gs[0])
  
  ax1.plot(xdat, ydat1)
  ax1.set_xlim(0,6.6)
  ax1.set_xticks(range(0,8,1))
  ax1.minorticks_on()
  [label.set_visible(False) for label in ax1.get_xticklabels() ]  # Make tick labels invisible
  
  ax2 = plt.subplot(gs[1], sharex=ax1)
  ax2.plot(xdat, ydat2, 'r-')
  ax2.yaxis.set_major_locator(MaxNLocator(nbins=5, steps=[1,2,4,5,10], symmetric=False, prune='upper'))
  plt.show()
  </code></pre>
  
  <p>I got the following image:
  <img src="https://i.stack.imgur.com/3wJa9.png" alt="Example plot where last minor tick is missing"></p>
  
  <p>I have no idea whether I found a bug or if there is an easy way to alleviate this problem (i.e. update matplotlib).</p>