Skip to content
  • Sponsor matplotlib/matplotlib

  • Notifications You must be signed in to change notification settings
  • Fork 7.9k

Deprecate case-insensitive colors. #13211

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
Jan 18, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 17, 2019

The motivation is explained in the changelog entry.

Note that even though

plt.plot([1, 2], [3, 4], "Y")

"worked" so far,

plt.plot([1, 2], [3, 4], "Yo")

(for example), i.e. additionally passing a marker spec, has not worked
at least since matplotlib 1.5 (a ValueError is thrown). As this does
not appear to have ever been raised on the issue tracker, I believe the
number of users of UPPERCASE colors must be limited.

(noted while working on #13210, where I had to use "Y0" instead of "Y"...)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

````````````

Support for passing colors as UPPERCASE strings is deprecated; color names will
become case-sensitive after the deprecation period has passed.
Copy link
Member

@timhoffm timhoffm Jan 17, 2019

Choose a reason for hiding this comment

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

Just for clarity, you should add that all buildings color names are lowercase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

The motivation is explained in the changelog entry.

Note that even though

    plt.plot([1, 2], [3, 4], "Y")

"worked" so far,

    plt.plot([1, 2], [3, 4], "Yo")

(for example), i.e. additionally passing a marker spec, has not worked
at least since matplotlib 1.5 (a ValueError is thrown).  As this does
not appear to have ever been raised on the issue tracker, I believe the
number of users of UPPERCASE colors must be limited.
@anntzer anntzer force-pushed the case-sensitive-colors branch from 226d5ee to aec2a56 Compare January 17, 2019 22:46
@NelleV NelleV merged commit ddd82b5 into matplotlib:master Jan 18, 2019
@QuLogic QuLogic added this to the v3.1 milestone Jan 18, 2019
@anntzer anntzer deleted the case-sensitive-colors branch January 18, 2019 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants