-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH: set default color cycle to named color sequence #29808
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Setting the default color cycle to a named color sequence | ||
--------------------------------------------------------- | ||
|
||
The default color cycle may now be configured in the ``matplotlibrc`` file or | ||
a style file to use any of the :doc:`/gallery/color/color_sequences`. For example | ||
|
||
.. code-block:: none | ||
|
||
axes.prop_cycle : cycler(color='Accent') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -417,9 +417,9 @@ | |
|
||
#axes.unicode_minus: True # use Unicode for the minus symbol rather than hyphen. See | ||
# https://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes | ||
#axes.prop_cycle: cycler('color', ['1f77b4', 'ff7f0e', '2ca02c', 'd62728', '9467bd', '8c564b', 'e377c2', '7f7f7f', 'bcbd22', '17becf']) | ||
# color cycle for plot lines as list of string color specs: | ||
# single letter, long name, or web-style hex | ||
#axes.prop_cycle: cycler(color='tab10') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😍 such a nice improvement! |
||
# color cycle for plot lines as either a named color sequence or a list | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As well as being more succinct, this saves me 40 microseconds 🚀 In [4]: %timeit validate_cycler("cycler('color', 'tab10')")
80.9 μs ± 1.25 μs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
In [5]: %timeit validate_cycler("cycler('color', ['1f77b4', 'ff7f0e', '2ca02c', 'd62728', '9467bd', '8c564b', 'e377c2', '7f7f7f', 'bcbd22', '17becf'])")
122 μs ± 952 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each) |
||
# of string color specs: single letter, long name, or web-style hex | ||
# As opposed to all other parameters in this file, the color | ||
# values must be enclosed in quotes for this parameter, | ||
# e.g. '1f77b4', instead of 1f77b4. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.