title: Show entire minor gridline in matplotlib figure
body: <p>I would like to show the topmost minor gridline (at 2.25) in its full width without adjusting the limits manually. How can I achieve this?</p>
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  import matplotlib as mpl
  
  t = np.arange(0.0, 2.0, 0.01)
  s = 1 + np.sin(2 * np.pi * t)
  
  fig, ax = plt.subplots(constrained_layout=True)
  
  ax.yaxis.set_tick_params(which='minor', width=5)
  ax.plot(t, s)
  ax.yaxis.set_major_locator(mpl.ticker.MultipleLocator(0.50))
  ax.yaxis.set_minor_locator(mpl.ticker.MultipleLocator(0.25))
  ax.grid(linewidth=5, axis='y', which='both')
  ax.set_ylim(0, 2.25)
  
  plt.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/fFrdq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fFrdq.png" alt="Screenshot" /></a></p>