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

Color cycle handling#6291

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
tacaswell merged 8 commits intomatplotlib:masterfrommdboom:color-cycle-handling2
Apr 28, 2016
Merged

Conversation

mdboom
Copy link
Member

Replaces#5674.

This uses the color cycle in more places.

It also introducesCn syntax for colors to directly address the Nth element in a color cycle. This was chosen over the[n] syntax in#5674 because it makes it more obvious that it's color-specific and can only be used in places where colors can be used.

@mdboommdboom mentioned this pull requestApr 11, 2016
@mdboommdboom added this to the2.0 (style change major release) milestoneApr 11, 2016
@@ -11,6 +11,9 @@
4) as a string representing a floating point number
from 0 to 1, corresponding to shades of gray.

5) as a special color "Cn", where n is a number 0-9 specifying the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The sentence above should be updated to say 5 ways.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for noticing. Done.

@QuLogic
Copy link
Member

I assume the test image was not intended to have changed colours.

@mdboom
Copy link
MemberAuthor

I assume the test image was not intended to have changed colours.

Indeed it was intentional. That test is testing a linestyle-only color cycle. Since it has no colors, it defaults to black, which is a more sensible default than the old blue.

if rcParams['_internal.classic_mode']:
c = 'b' # The original default
else:
c = self._get_patches_for_fill.get_next_color()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I am +.75 on this.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

vs.c = 'C0'?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah, that is the only other plausibly defensible position.

My only reservation is that we have pushed back on this suggestion for so long and that in most cases if you are not mapping the color youprobably want to be usingplot(x, y, 'o') instead.

That said, I have no real protest with this.

@@ -867,7 +867,7 @@ def validate_animation_writer_path(p):
## patch props
'patch.linewidth': [None, validate_float_or_None], # line width in points
'patch.edgecolor': ['k', validate_color], # black
'patch.facecolor': ['#1f77b4', validate_color], # blue (first color in color cycle)
'patch.facecolor': ['C0', validate_color], # blue (first color in color cycle)
Copy link
Member

@jenshnielsenjenshnielsenApr 25, 2016
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Delete blue in the comment here?

@efiring
Copy link
Member

This is related to#6328.

@tacaswelltacaswell merged commit8af02b3 intomatplotlib:masterApr 28, 2016
@tacaswell
Copy link
Member

backported to v2.x ase524354

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.

5 participants
@mdboom@QuLogic@efiring@tacaswell@jenshnielsen

[8]ページ先頭

©2009-2025 Movatter.jp