when plotting, matplotlib sets automatically the scales from the data content being plotted. But it seems the limits on both axes are always equal to the maxima from the dat
(copied almost directly from How to autoscale y axis in matplotlib?)
You want margins doc
margins
ex
ax.margins(y=.1, x=.1)
Also see Add margin when plots run against the edge of the graph