Closed anntzer closed 8 years ago
Thanks especially for this one! I'd been looking for a robust and simple way to do that and somehow overlooked the widgetlock
.
I've been behind on maintaining mpldatacursor
lately. That should change in the very near future.
Enough enhancements have accumulated to justify a 0.7
release. I think I'll try to get a few more bugfixes in this weekend and release either this weekend or next.
Also, thanks for all of your contributions lately. I've been late in responding, but I do greatly appreciate them!
Actually, I just realized that sometimes, allowing click events even when zooming or panning is active can be useful (use case: I'm using mpldatacursor for interactive data selection, so I want to zoom, click on a point, pan somewhere else, click on another point, and retrieve the data from datacursor.annotations).
I guess one can add an argument to the constructor, "exclusive=True", which switches this behavior. Thoughts? Thoughts on the name of the argument?
That's the typical use case, in my experience. However, even with that in mind, disabling the datacursor during zooming is the right thing to do. (It's actually how it worked in the past when it was based on a connection to the pick event.)
By default, pressing the zoom/pan/whatever button again after zooming/etc will re-enable the normal pick mode where mpldatacursor
works. I should probably put a note about that in the readme, as it used to be a relatively frequently asked question, and not obvious unless you're quite familiar with matplotlib.
It is possible (albeit it a bit hackish) to have mpldatacursor
make the zoom/pan/etc buttons only work once. E.g. "zoom" mode zooms once, then goes back to normal pick mode without having to press the zoom button again. I'd prefer not to go that route, as it changes how the matplotlib toolbar works.
All's in the title.
Also kindly asking whether a release is planned any time soon. Thanks!