I need help with setting the limits of y-axis on matplotlib. Here is the code that I tried, unsuccessfully.
import matplotlib.pyplot as plt plt.figure(1, fi
Try this . Works for subplots too .
axes = plt.gca() axes.set_xlim([xmin,xmax]) axes.set_ylim([ymin,ymax])