Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simplify color/marker disambiguation logic in _process_plot_format. #27829

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 1 commit into from
Mar 21, 2024

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Feb 28, 2024

There's a bit of code in the parsing of plot() format shorthands to disambiguate the "1" marker and the "1.0" grayscale color string. It's actually easier to just explicitly check for the bad strings.

This also makes it clearer that we could have supported "0" as unambiguous color string (white) as there's no "0" marker (there's a 0 (int) marker, which is not the same...), but let's not bother with changing any semantics.

Noted while looking at #27827 and #27828.

PR summary

PR checklist

There's a bit of code in the parsing of plot() format shorthands to
disambiguate the "1" marker and the "1.0" grayscale color string.  It's
actually easier to just explicitly check for the bad strings.

This also makes it clearer that we *could* have supported "0" as
unambiguous color string (white) as there's no "0" marker (there's a
0 (int) marker, which is not the same...), but let's not bother with
changing any semantics.
@QuLogic QuLogic added this to the v3.9.0 milestone Mar 21, 2024
@QuLogic QuLogic merged commit 42472ef into matplotlib:main Mar 21, 2024
@anntzer anntzer deleted the ppf branch March 21, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants