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