Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[ENH]: Built-in crosshair tool through gui-native crosshair cursor #30515

@timhoffm

Description

@timhoffm

Problem

Our naive approaches to crosshair cursors https://matplotlib.org/devdocs/gallery/widgets/cursor.html have the disadvantage that the crosshair is drawn on the figure. This means an expensive redraw of the the figure for every cursor position change and results in a laggy behavior.

Proposed solution

We could grow an API on Canvas to draw a crosshair with GUI native lines. That should be relatively easy. We only need the size of the Axes-under-cursor in figure coordinates to determine the length of the crosshair.

The goal would be to add a crosshair tool in addtion to Pan and Zoom.

This tool should be much easier to use than a Cursor widget and much more efficient.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions