matplotlib plot y axis code example Example: matplotlive y axis from matplotlib.pyplot.ylim plt.ylim(-2, 2) plt.xlim(0,10)