set x y axis in plt code example Example: set axis plt python from matplotlib import pyplot as plt plt.axis([0, 10, 0, 20])