plt set limits code example
Example 1: set axis limits matplotlib
axes.set_xlim([xmin, xmax])
axes.set_ylim([ymin, ymax])
Example 2: ylim python
plt.ylim([a,b])
Example 3: set axis plt python
from matplotlib import pyplot as plt
plt.axis([0, 10, 0, 20])