Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
efiring merged 2 commits intomatplotlib:masterfrommdboom:new-dash-styles
Feb 8, 2016

Conversation

mdboom
Copy link
Member

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 doingscale = max(1, linewidth) as a function there, but we could be more clever if we wanted to. The following shows the scaling by linewidth.

figure_1-1

  • The macosx backend will need special updates to support scaling by linewidth, which I think is best doneafter a first round of comments here.

@mdboommdboom added this to the2.0 (style change major release) milestoneJan 27, 2016
@dopplershift
Copy link
Contributor

👍 from me. This is another nice gain in the aesthetics. Nothing jumped out at me in the implementation.

@WeatherGod
Copy link
Member

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?

@mdboom
Copy link
MemberAuthor

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.

efiring added a commit that referenced this pull requestFeb 8, 2016
Fix#5917. New dash patterns. Scale dashes by lw
@efiringefiring merged commiteb2b77b intomatplotlib:masterFeb 8, 2016
tacaswell pushed a commit that referenced this pull requestFeb 8, 2016
Fix#5917. New dash patterns. Scale dashes by lw
@tacaswell
Copy link
Member

backported to v2.x as069785d

@mdboom
Copy link
MemberAuthor

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

@efiring
Copy link
Member

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

6 participants
@mdboom@dopplershift@WeatherGod@tacaswell@efiring@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp