Getting zoom extent from the interactive imshow/plot

hi!,
i am using %matplotlib widget and then some imshow()

the interactive plot allows the users to change the extent with a zoom feature. i would like to get the coordinates of the extent, possibly when a button is pushed or something.

so flow is user zooms the plot, hits ‘go’, then some other function in the next cell can read what the extent coords are. is this possible? whats the best way to do this?

nevermind! i got it: ax.get_extent()

2 Likes