In pyplot, I am usually plotting large amounts of data and hence, always using ZOOM (by pressing the 'Zoom to rectangle' button, which got kind of bothering always doing that). Is there a way to activate the zoom function by command line in python? Have searched for it a lot, but no luck. I wish something like that would be possible:
plt.pyplot(X,Y) # plot some data
plt.zoom_activate() # !! activate the 'Zoom to rectangle' - that's what Im looking for
plt.show() # show the pyplot
The command you're looking for is
fig.canvas.toolbar.zoom()
if fig
is a matplotlib figure.