-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outstanding work on interactive regions functionality #391
Comments
I like this approach. I can see cases where you want both options: the most common case is probably "click anywhere on the region", but if you have a bunch of overlapping regions, it might be convenient to switch to 'click on center' mode so that you can select a region that's behind another (as long as they're not concentric). This is an issue I run into pretty often w/ds9 region editing; the only way to handle it there is to explicitly move a region to the front/back - which is fine, but it would be neat if there were another approach. On that note - do you know how overlapping regions work with selectors? |
Yes, I admittedly haven't felt a strong need for that behaviour, but I also can hardly imagine a situation were dragging from anywhere inside the region would be confusing or counterintuitive. And when combining it with rotation, it's definitely more awkward having to press I haven't tried anything with overlapping (or any multiple) regions so far, sorry. |
Well, at least interactively this seems to become tricky, as all regions (overlapping or not) will try to interpret the mouse interactions simultaneously! May need further work to connect the mouse/key event to one selector at a time. |
Opening this just to keep track of the task list outlined and partly completed in #317:
The last point is under development in #390.
Re. allow the whole region to be clicked and dragged this is already implemented by holding
space
and seems to just work, but the matplotlib documentation feels a bit unclear about it. The modifier key is defined for_SelectorWidget
inhttps://github.com/matplotlib/matplotlib/blob/01fb7bb2d9a674a05f704fc50d36e0baa7d6079c/lib/matplotlib/widgets.py#L1798-L1799
but the docstring e.g. for
RectangleSelector
stateshttps://github.com/matplotlib/matplotlib/blob/01fb7bb2d9a674a05f704fc50d36e0baa7d6079c/lib/matplotlib/widgets.py#L2626-L2634
where possibly
' '
has simply been confused forNone
. Ping the matplotlib devs for clarification?Additionally matplotlib/matplotlib#19657 has added an option to always enable this behaviour; currently this can be activated by
so all that remains to be done there would be to let
region.as_mpl_selector
pass this kwarg to the Selector on creation.According to the docs this should already be done, but apparently
**kwargs
have got lost somewhere on the way to the *Selector
call; I've set up a tentative fix in #392.The text was updated successfully, but these errors were encountered: