how to set range of y axis in plot code example Example 1: plot bounds python plt.xlim([25, 50]) Example 2: plot bounds python ax.set_ylim([-1, 0])