Skip to content
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

markerfacecolor should not override fillstyle='none' in plot() #17544

Merged
merged 1 commit into from Jun 5, 2020

Conversation

timhoffm
Copy link
Member

PR Summary

Previously using plt.plot([1, 3, 2], marker=MarkerStyle('o', fillstyle='none'), markerfacecolor='red') resulted in the markers to be filled red. This does not make sense as it silently discards fillstyle='none'.

Instead, the markers should still be unfilled. Markerfacecolor is already ignored for unfillable markers like 'x'. The same should hold for unfilled marker that could potentially be filled but are explicitly set to be unfilled.

The effect of this can be seen in the 'none' markers being filled at
https://matplotlib.org/devdocs/gallery/lines_bars_and_markers/marker_reference.html#marker-fill-styles. (Here it's triggered with keyword argument fillstyle='none', but the code path is the same).

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Should there be a test?

@timhoffm
Copy link
Member Author

timhoffm commented Jun 4, 2020

Test added.

@tacaswell tacaswell added this to the v3.3.0 milestone Jun 5, 2020
Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Anyone can merge on green.

@efiring efiring merged commit 81e27d4 into matplotlib:master Jun 5, 2020
@timhoffm timhoffm deleted the plot-fillstyle-none branch June 10, 2022 21:18
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