set axis of a figure python code example Example: set axis plt python from matplotlib import pyplot as plt plt.axis([0, 10, 0, 20])