-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
SpanSelector widget: Improve doc for extents
#27397
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
Co-authored-by: hannah <story645@gmail.com>
sorry my suggestion made the line too long so you'll have to fix that |
lib/matplotlib/widgets.py
Outdated
@@ -2695,7 +2695,7 @@ def _press(self, event): | |||
|
|||
@property | |||
def direction(self): | |||
"""Direction of the span selector: 'vertical' or 'horizontal'.""" | |||
"""Direction of the span selector: 'vertical' or 'horizontal'. Writable.""" |
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.
What are you trying to communicate w/ writable?
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.
The property has a setter. When everything else in matplotlib is set_title()
or whatever, I don't take that for granted.
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.
No guidance here for if properties were actually used. https://matplotlib.org/devdocs/devel/document.html#setters-and-getters
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 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.
@judfs can you remove the writable? I don't think it's conveying what you intend to here and I don't want to hold up your PR longer
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.
Changed 👍 . As a user of mpl, I still would find it non obvious that the property is read/write / settable, but that is a more general issue. For now glad to have what the extents are described.
Thanks for the contribution! I think there's follow up here, both on how we communicate that something is a property and probably similar to #27200 about adding an extents role to the one place we define extents. |
…397-on-v3.8.x Backport PR #27397 on branch v3.8.x (SpanSelector widget: Improve doc for `extents`)
PR summary
Explains what the extents are. Addresses my problem here https://discourse.matplotlib.org/t/spanselector-how-to-set-selection-with-code/24114/4
Old:
https://matplotlib.org/stable/api/widgets_api.html#matplotlib.widgets.SpanSelector.extents
New rendering:
PR checklist