Skip to content

need for rubberband in zoom tool #3475

Closed

Description

@fariza

Working on MEP22, I have been trying to find the right place to put the draw_rubberband method. That is specific to each backend.

One question arises:
What is the need for this method if we have matplotlib.widgets.RectangleSelector?

For what I can see, draw_rubberband dates prior to 2004, and RectangleSelector dates to 2005.
Maybe, and this is just a wild guess, mpl keept the rubberband just because it was there before.

Is there any technical reason for the existence of both? what would be the problem of just getting rid of rubberband and using RectangleSelector

Activity

  1. mdboom commented on Sep 5, 2014

    @mdboom
    Member

    draw_rubberband draws the box using the native calls in whatever GUI framework is being used. This can be a lot faster over a remote X11 connection, for example -- this is also important for the NbAgg backend where there might be a high-latency connection between the browser and the server. The RectangleSelector, as all matplotlib "widgets", uses Agg to do the drawing, so requires an expensive/high bandwidth transfer of the screen buffer.

  2. fariza commented on Sep 5, 2014

    @fariza
    MemberAuthor

    Ok, that makes sense.
    What would be the problem in using draw_rubberband inside the RectangleSelector (if available)?
    I am just trying to unify things.

  3. mdboom commented on Sep 5, 2014

    @mdboom
    Member

    That may work -- definitely worth experimentation.

  4. added this to the v1.4.x milestone on Sep 6, 2014
  5. tacaswell commented on Sep 6, 2014

    @tacaswell
    Member

    @fariza Closing this as the question got answered. I assume this will be replaced by a PR anyway if it works.

    Please ping to have re-opened if you disagree.

  6. blink1073 commented on Sep 11, 2014

    @blink1073
    Member

    This could be used to replace the line version of the RectangleSelector, but it would be nice to keep the option to draw a patch with tunable options. I will add this to my PR.

  7. blink1073 commented on Sep 11, 2014

    @blink1073
    Member

    Actually, what I ended up doing is using drawRectangle while dragging, and then drawing the desired shape upon release.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions