-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #5917. New dash patterns. Scale dashes by lw #5926
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
👍 from me. This is another nice gain in the aesthetics. Nothing jumped out at me in the implementation. |
One concern is with the legend. In linewidth 5 image, the dashed and dashdot lines are cut off in such a way that you don't see the complete sequence. Is there some way to guarantee that at least one complete cycle is drawn? |
Yeah, I saw that, too. On the one hand, a line width of 5 is somewhat outside of the norm, so I'm not too concerned (and if you want big lines, you probably want to just increase the dpi). We could look into making the legend swatches longer -- but making sure it's always long enough for whatever random dash pattern the user gives will be tricky. |
04ffd42
to
cb52bc0
Compare
Fix #5917. New dash patterns. Scale dashes by lw
Fix #5917. New dash patterns. Scale dashes by lw
backported to v2.x as 069785d |
I think this got merged too soon. This doesn't include the fix for the macosx backend to scale dashes by linewidth. I've made a new issue in #5986 |
Mike, this was deliberate. Tom and I decided it was better not to hold up the style changes for the sake of the macosx backend. If the necessary modifications to that backend can be made, so much the better, but in the meantime we need to move forward to get 2.0 out, with or without full macosx backend compatibility. |
This changes the dash patterns as suggested by @njsmith in #5917.
The "standard" 3 dash patterns are no longer hardcoded, but are not settable from rcParams.
Dash patterns are now scaled by the linewidth, unless running in "classic compatibility mode". As suggested by #5917 (comment), scaling by linewidth is not applied when the linewidth gets small. I'm just doing
scale = max(1, linewidth)
as a function there, but we could be more clever if we wanted to. The following shows the scaling by linewidth.