Skip to content

Proposal: Interactive Selection Tools #5782

Closed as not planned
Closed as not planned

Description

@blink1073

I propose a new module called interactive_selectors.py that provides a simplified interface for selection tools that can have interaction after they are drawn.

  • Create new Lasso, Rectangle, Polygon, Ellipse, Span, and Line tools.
  • Deprecate the _SelectorWidgets in favor of these new tools, which would have a much simpler interface and consistent behavior.
  • Support the ability to have multiple tools on the same axis, a use case we support in scikit-image, and is also provided in PyQtGraph.
  • Always blit if available while drawing, and then draw statically when finished if interactive=True (the default).
  • All tools will have a "move" handle in the center and other appropriate handles.

I would prefer to close #5751 and start work on this new module.

Activity

  1. blink1073 commented on Jan 2, 2016

    @blink1073
    MemberAuthor

    Note that the Paint tool I previously proposed would still live in widgets.py.

  2. blink1073 commented on Jan 2, 2016

    @blink1073
    MemberAuthor

    Code that provides the proper blit behavior:

    def start(self):
        if self.interactive:
            for artist in self.artists:
                artist.set_visible(False)
            self.canvas.draw()
        for artist in self.artists:
            artist.set_animated(self.useblit)
            artist.set_visible(True)
        self.update()
    
    def finish(self):
        if self.interactive:
            for artist in self.artists:
                artist.set_animated(False)
        else:
            for artist in self.artists:
                artist.set_visible(False)
        self.canvas.draw_idle()
  3. tacaswell commented on Jan 2, 2016

    @tacaswell
    Member

    👍 from me. I have had similar thoughts (but not done anything about it).

  4. added this to the milestone on Jan 2, 2016
  5. blink1073 commented on Jan 2, 2016

    @blink1073
    MemberAuthor

    Great, good thing I already started working on it 😉

  6. pelson commented on Jan 3, 2016

    @pelson
    Member

    Just wondering, have you considered the ability to rotate the selector?

  7. blink1073 commented on Jan 3, 2016

    @blink1073
    MemberAuthor

    You could add a separate rotation handle and give it a different marker type, but I'm going to hold off on that for now.

  8. pelson commented on Jan 4, 2016

    @pelson
    Member

    but I'm going to hold off on that for now.

    Not unreasonable at all. I was just mentioning as I can imagine it is a route we may take in the future, and it would be nice not to close the door on the possibility of doing so.

  9. modified the milestones: , on Oct 3, 2017
  10. github-actions commented on Mar 20, 2023

    @github-actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  11. added
    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.
    on May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    New featurestatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions