You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Doc]: .set_linestyle() tuple method is unclear #26784
I think this would not be quite right as it seems to imply only a length 2 on-off pattern, whereas any even number should work. The linestyles example explains things pretty well, so possibly a good way to improve here is to just link the example from the docstring?
There is a PR which deals with most of these things that hopefully will be merged for 3.9: #23056
(The discussions are really about what get_linestyle and get_dashes should return, as that is currently inconsistent between classes and unifying it will probably break some code somewhere.)
For the original issue: yes, it is maybe unclear, but correct. Probably it can be clarified a bit further in the PR above, but it does link to the example @rcomer pointed out.
An additional challenge here is that set_dashes only takes the on-off-seq-part so it is not possible to change offset later.
I think this would not be quite right as it seems to imply only a length 2 on-off pattern, whereas any even number should work. The linestyles example explains things pretty well, so possibly a good way to improve here is to just link the example from the docstring?
I haven't seen this page before. Thanks for sharing. And yes, I think having this page linked in the doc would help as well.
Activity
pawjast commentedon Sep 15, 2023
Also, the
lineobject has a methodset_dashes()and I wonder if it's a viable option to add a similar method to thespineobject.https://matplotlib.org/stable/gallery/lines_bars_and_markers/line_demo_dash_control.html
rcomer commentedon Sep 15, 2023
(offset, (on_ink, off_ink))I think this would not be quite right as it seems to imply only a length 2 on-off pattern, whereas any even number should work. The linestyles example explains things pretty well, so possibly a good way to improve here is to just link the example from the docstring?
oscargus commentedon Sep 15, 2023
There is a PR which deals with most of these things that hopefully will be merged for 3.9: #23056
(The discussions are really about what
get_linestyleandget_dashesshould return, as that is currently inconsistent between classes and unifying it will probably break some code somewhere.)For the original issue: yes, it is maybe unclear, but correct. Probably it can be clarified a bit further in the PR above, but it does link to the example @rcomer pointed out.
An additional challenge here is that
set_dashesonly takes theon-off-seq-part so it is not possible to changeoffsetlater.pawjast commentedon Sep 15, 2023
I haven't seen this page before. Thanks for sharing. And yes, I think having this page linked in the doc would help as well.
DOC: Clarify and unify set_linestyle
DOC: Clarify and unify set_linestyle
DOC: Clarify and unify set_linestyle (matplotlib#30855)