get xlim python 1

get xlim python

ax=plt.subplot(111)
ylims=ax.get_ylim()
xlims=ax.get_xlim()

Here is what the above code is Doing:
1. We’re creating a figure object, which is the canvas on which we’ll draw our plot.
2. We’re creating an axis object, which is the actual plot.
3. We’re getting the y-axis limits of the plot.
4. We’re getting the x-axis limits of the plot.

Similar Posts