Reputation: 2621
I plot a figure with:
fig=plt.figure()
ax=fig.add_subplot(111)
ax.plot(date,tso1.values)
How can I gain the figure's y-axis max and min values? thank you.
Upvotes: 0
Views: 97
Reputation: 8668
if with "gain" you mean get, the answer is ax.get_ylim()
.
A suggestion: I use ipython to inspect objects and the help()
to understand what the methods do. On top of it, matplotlib method names tends to be very accurate. You can learn a lot about what you can do just playing with ipython and tab completion
Upvotes: 3