Skip to content
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

Support zooming vertically/horizontally by dragging left/right or up/down on the respective axist #17

Open
damageboy opened this issue Jan 18, 2024 · 2 comments

Comments

@damageboy
Copy link

Many modern charting/plotting UIs allow users to click on the axis (vertical/horizontal) and:

  • drag up/down
    • for vertical axis
  • left/right
    • for horizontal axis

I'd love for the plot to allow for an api, much like the existing allow_drag() api to enable axis zooming by dragging.
This should probably named in a descriptive way, something like: allow_axis_zoom_drag()

@damageboy
Copy link
Author

Just updating that I have a PoC that kind of works, more or less. trying to iron out some issues there and will submit as a draft for review of the overall approach

@emilk emilk transferred this issue from emilk/egui Jul 15, 2024
@alexforencich
Copy link

I just checked how pyqtgraph does this - you can left click and drag to pan, and right click and drag to zoom, both on the axis (affects just that axis) as well as on the actual plot area (affects both axes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants