Rectangle Selector Upgrade#3937
Conversation
lib/matplotlib/widgets.py
Outdated
There was a problem hiding this comment.
This should maintain the return behaviour.
|
The test failures look like they are coming out of |
|
@tacaswell I believe I addressed your concern about return values. |
lib/matplotlib/tests/test_widgets.py
Outdated
There was a problem hiding this comment.
These need @cleanup decorators, I suspect that is related to the seemingly un-related failures as the global state of pyplot leaks across tests.
|
Down to pep8 issues: |
|
This fell off the bottom of my internal FILO buffer, what is the state of this? |
|
The last few commits were some cleanup as a result of using this branch to make the contrast selector tool. I'd say its done and ready. |
|
Current priority is getting 1.4.3rc1 cut, hopefully I will be able to loop back to the master branch stuff 'soon'. |
|
No problemo. |
|
@blink1073 it's been a long time, but did you test this changes with the new |
|
@fariza, I just did a rebase and played with the |
7a30732 to
f73682f
Compare
|
My concern comes from #1368 |
|
That makes sense to me. |
|
I just tried and I noticed a little change in the behaviour. |
|
Sorry, I just read the description. |
|
@fariza, assuming @tacaswell agrees with the new behavior, I can update the example. One would clear the selection by clicking outside of the selection (without dragging). |
|
Wouldn't it be better to add a kwarg to persist after release? |
|
I agree with both statements: preserve the previous behavior and allow the escape key to clear the selection. |
|
Ah, I remember now. It is "control" if it is the only key and "ctrl" in a key combination. I can just account for that one special case. |
|
How about a |
|
Interesting idea. It would help keep the constructor from getting cluttered. On Tue, Aug 25, 2015 at 8:32 AM, Steven Silvester notifications@github.com
|
|
@blink1073 I like the @WeatherGod @tacaswell There are several places around the code, that we hardcoded |
|
I settled on |
|
Both test failures looked like the tex related transients. @fariza I agree re the need for a centralized way to manage key event bindings, but want to punt on that for this PR. @WeatherGod If you are happy, please merge this. |
lib/matplotlib/widgets.py
Outdated
There was a problem hiding this comment.
I like this. It also helps to keep all the possible actions and associated keys in one place.
ENH: Rectangle Selector Upgrade
|
@blink1073 Can you add a whats_new in a new PR? |
|
@WeatherGod Merged this as no activity for a week, we can iterate in smaller PRs if needed. |
|
@tacaswell, indeed. Sorry for the silence on my end as other things came up. Unfortunately, I don't see much relief in sight over the next few weeks. |
|
@tacaswell, which one would you like next? I was thinking |
|
LassoSelector sounds good to me. On Tue, Sep 8, 2015 at 9:33 AM Steven Silvester notifications@github.com
|
|


This builds on #3486 and #3502.
This improves the
RectangleSelectorand adds anEllipseSelectorwith minimal code differences.Improvements:
The API is the same (unless using the modifier keys), but we add the
interactivekeyword arg to enable the new behavior.