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