Add padding to time axis in matplotlib
<p>I have a scatter plot created in matplotlib in python where the x-axis is the date and the y-axis is the time. I would like to add some padding to my y-axis so the points aren't cut off at the top and bottom. I've heard of setting  <code>ax.ylim([x,y])</code> to be a little bit smaller than the smallest value and a little bit larger than the largest value but this is impossible with time as there is no such thing as negative time or 25:00.</p>

<p>This is what the image looks like now:
<a href="https://i.stack.imgur.com/KfkJr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KfkJr.png" alt="enter image description here"></a></p>

<p>As you can see the points at the top and bottom are cut off.</p>

<p>Any help would be greatly appreciated! </p>