-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Disable QuadMesh cursor data by default #22254
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
Conversation
071e62f
to
5511ad4
Compare
lib/matplotlib/collections.py
Outdated
@@ -1934,6 +1934,12 @@ class QuadMesh(Collection): | |||
|
|||
shading : {'flat', 'gouraud'}, default: 'flat' | |||
|
|||
Attributes | |||
---------- | |||
show_cursor_data : bool |
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.
Do we have a comparable API on anything else?
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.
Searching the docs for cursor_data
suggests we don't.
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.
Do we want to make this a general Artist API, and set as appropriate for different artists (like set_snap, set_in_layout, etc)?
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.
This sounds like a good idea, but maybe not for a bugfix release.
I agree the slowness isn't really acceptable. No strong opinion as to the exact control API (well, perhaps a vague preference for a setter/getter for API consistency, but heh). |
5511ad4
to
33ba4b3
Compare
Do we have any general policy or preference for attribute vs. property vs. getter/setter? I'm also open to any, but attribute was the fewest lines of code to implement 😄 |
I don't know policy-wise, but the statu quo would certainly be a setter. |
33ba4b3
to
63a65c5
Compare
63a65c5
to
2f424ec
Compare
…254-on-v3.5.x Backport PR #22254 on branch v3.5.x (Disable QuadMesh cursor data by default)
PR Summary
For moderately sized QuadMeshes getting the cursor data is very slow - see #21917 (comment). As such, disable by default for now, but allow users to manually enable it.
Fixes #22253
Fixes #21917
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).