-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Line2D dash pattern getter #17316
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
Comments
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
I think @oscargus has a PR on this, so it shouldn't be closed until then. |
Originally posted by @timhoffm in #29302 (comment) |
Bug report
Bug summary
For
lines.Line2D
, there existsline.get_linestyle()
which returns a short string representation of one of the four preconfigured line styles ("-"/"--"/":"/"-."
). For the "dashed" ("--") style, which is returned wherever the linestyle input is a tuple (ordashes
kwarg was used orset_dashes
was called with tuple input), the exact dash pattern is not returned. There's noline.get_dashes()
.On the contrary,
collections.LineCollection([], linestyle=style).get_linestyle()
returns the (scaled) dash pattern and not the preconfigured linestyle, which is more general and helpful.collection.get_dashes()
is an alias forget_linestyle()
.Is it possible to add a getter for the (unscaled) original dash pattern of a line2d instance?
Code for reproduction
Actual outcome
Expected outcome
Matplotlib version
Many thanks for considering this!
The text was updated successfully, but these errors were encountered: