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

Skip to content

Default stem marker color follows the linecolor #23233

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
Jul 21, 2022

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Jun 9, 2022

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 timhoffm added this to the v3.6.0 milestone Jun 9, 2022
@timhoffm timhoffm marked this pull request as draft June 9, 2022 22:48
@oscargus
Copy link
Member

oscargus commented Jun 10, 2022

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 timhoffm changed the title Defaiult stem marker color follows the Default stem marker color follows the linecolor Jun 10, 2022
@timhoffm
Copy link
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.

@oscargus
Copy link
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 timhoffm force-pushed the stem-marker-color branch 4 times, most recently from 495e76d to f02a3f3 Compare June 19, 2022 21:24
@timhoffm timhoffm force-pushed the stem-marker-color branch from f02a3f3 to 549054f Compare June 19, 2022 21:54
@timhoffm timhoffm marked this pull request as ready for review June 19, 2022 21:56
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 timhoffm force-pushed the stem-marker-color branch from 549054f to 203cf26 Compare July 6, 2022 21:24
@tacaswell tacaswell merged commit 83e20e4 into matplotlib:main Jul 21, 2022
@timhoffm timhoffm deleted the stem-marker-color branch July 21, 2022 19:30
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