FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Default stem marker color follows the linecolor by timhoffm · Pull Request #23233 · matplotlib/matplotlib · GitHub

Repository navigation

Default stem marker color follows the linecolor - #23233

Merged
tacaswell merged 1 commit into
matplotlib:mainfrom
timhoffm:stem-marker-color
Jul 21, 2022
Merged

tacaswell merged 1 commit into
matplotlib:mainfrom
timhoffm:stem-marker-color

Conversation

timhoffm commented Jun 9, 2022 •
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

This builds on top of #23232.

If stem markerfmt does not contain a color, use the color from linefmt
instead of the hard-coded 'C0'. While this is technically a breaking
API change, it is unlikely that somebody wants to color their lines,
but intentionally leaves their marker color as default 'C0'. I think
there is no simple mechanism that'd allow a deprecation. All I can
think of would require user actions at the beginning and at the end
of the deprecation period. Given that this should only affect very
few users and there is a simple workaround (state both format explitly).

timhoffm added this to the v3.6.0 milestone Jun 9, 2022
timhoffm marked this pull request as draft June 9, 2022 22:48

oscargus commented Jun 10, 2022 •
edited
Loading

Copy link
Copy Markdown
Member

Can you pass "" as markerfmt here?
"r"? (only passing a color, using the default marker)

Context: #23230 (not sure if this is a consequence of this PR or a coincident)

timhoffm changed the title Defaiult stem marker color follows the Default stem marker color follows the linecolor Jun 10, 2022

Copy link
Copy Markdown
Member Author

Will check that. Part of the problem is that currently markerstyle is just uses regular plot logic and if given e.g. 'r' that would be a red line connecting the points. IMHO we need special logic for markerstyle, which reflects the needs of stem. This PR does that and the "r" and "" issues would need a similar special handling.

Copy link
Copy Markdown
Member

When I thought about this yesterday, I was contemplating providing the options that are set at the end of _process_plot (or whatever the exact name is, on the phone) in case of None as optional keyword arguments with the current ones as default. (Special handling for default color though.)

That together with replacing "" with " " (or simply deal with it explicitly) may solve it.

timhoffm force-pushed the stem-marker-color branch 4 times, most recently from 495e76d to f02a3f3 Compare June 19, 2022 21:24
timhoffm force-pushed the stem-marker-color branch from f02a3f3 to 549054f Compare June 19, 2022 21:54
timhoffm marked this pull request as ready for review June 19, 2022 21:56
Comment thread lib/matplotlib/tests/test_axes.py Outdated
instead of the hard-coded 'C0'. While this is technically a breaking
API change, it is unlikely that somebody wants to color their lines,
but intentionally leaves their marker color as default 'C0'. I think
there is no simple mechanism that'd allow a deprecation. All I can
think of would require user actions at the beginning and at the end
of the deprecation period. Given that this should only affect very
few users and there is a simple workaround (state both formats
explicitly).
timhoffm force-pushed the stem-marker-color branch from 549054f to 203cf26 Compare July 6, 2022 21:24
tacaswell merged commit 83e20e4 into matplotlib:main Jul 21, 2022
timhoffm deleted the stem-marker-color branch July 21, 2022 19:30
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
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.

4 participants


Back | FazBrowse Home | New Git URL