I have some data plotted which includes some limits on each subplot:
Both axes have the limits, but since the data fits so nicely within the limits on the second plot, the limits themselves set the boudaries for the y-axis, making them invisible.
To make them visible, I could do something like this:
axes.set_ylim(1.1*lowerLimit,1.1*upperLimit)
where lowerLimit and upperLimit are the data used to generate the limits in the first place, but I am wondering if matplotlib has a mechanism to tell it to not be so zealous in it’s automatic setting of the limits. The solution I have now also has the limitation that if the data deviates from the boundaries, it risks going outside the lines, so I searched for a complement to set_ylim() which would tell me what the limits are, somehting like get_ylim() but it does not seem to exist in the documentation.
Thanks for your help.
In regards to your request for a function to change the y-axis limits, would this suit your purposes?:
Documentation:
get_ylim()