r/matplotlib • u/s195t • Sep 01 '21
Trigger event when zooming in
Hi everyone,
Is there a way to call a certain function automatically when we zoom in a plot?
Reading the documentation I found this which should do what I need but maybe there is a more efficient way...
matplotlib.backend_bases.ResizeEvent() Thank you all
2
Upvotes
View all comments
Show parent comment
1
u/s195t Sep 02 '21
Thank you a lot! mpl_connect is surely the way to go
If ‘resize_event’ triggers when the x or the y limits change then it should also work. I was afraid that it was meant to work when the physical size of the window is changed…