how to set range of scale on y axis in matplotlib code example Example: set axis limits matplotlib axes.set_xlim([xmin, xmax]) axes.set_ylim([ymin, ymax])