-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cleanup cursor_demo. #12955
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
Cleanup cursor_demo. #12955
Conversation
examples/misc/cursor_demo_sgskip.py
Outdated
|
||
Faster cursoring is possible using native GUI drawing, as in | ||
wxcursor_demo.py. | ||
:doc:`/gallery/user_interfaces/wxcursor_demo_sgskip`. | ||
|
||
The mpldatacursor and mplcursors third-party packages can be used to achieve a | ||
similar effect. See | ||
|
||
https://github.com/joferkington/mpldatacursor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/joferkington/mpldatacursor | |
- https://github.com/joferkington/mpldatacursor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched to rst anonymous link syntax
examples/misc/cursor_demo_sgskip.py
Outdated
|
||
Faster cursoring is possible using native GUI drawing, as in | ||
wxcursor_demo.py. | ||
:doc:`/gallery/user_interfaces/wxcursor_demo_sgskip`. | ||
|
||
The mpldatacursor and mplcursors third-party packages can be used to achieve a | ||
similar effect. See | ||
|
||
https://github.com/joferkington/mpldatacursor | ||
https://github.com/anntzer/mplcursors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/anntzer/mplcursors | |
- https://github.com/anntzer/mplcursors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above.
examples/misc/cursor_demo_sgskip.py
Outdated
|
||
Faster cursoring is possible using native GUI drawing, as in | ||
wxcursor_demo.py. | ||
:doc:`/gallery/user_interfaces/wxcursor_demo_sgskip`. | ||
|
||
The mpldatacursor and mplcursors third-party packages can be used to achieve a | ||
similar effect. See |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand, the "similar" part is not quite true. This example focusses on drawing a cross-hair (free or snapped to data). The mentioned cursor packages add an annotation. I think the meaning of "cursor" is quite different here and there and thus should be clarified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually the wx example linked also does something different; the whole text could be redone. Feel free to push if you have something better.
requires redrawing the figure with every mouse move. | ||
This example shows how to use Matplotlib to provide a data cursor. It uses | ||
Matplotlib to draw the cursor and may be a slow since this requires redrawing | ||
the figure with every mouse move. | ||
|
||
Faster cursoring is possible using native GUI drawing, as in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also https://matplotlib.org/gallery/widgets/cursor.html
which seems like a better builtin version of this example. It should at least be linked.
Given this, do we still need this example here? If so, it's probably only for educational puposes and that should be mentioned.
- Less pyplot, more OO. - Showcase both Cursor implementations. - Misc. cleanups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incremental improvement.
PR Summary
PR Checklist