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

UserWarning: Setting the 'color' property will override the edgecolor or facecolor properties #114

Open
HealthyPear opened this issue Nov 12, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good issue for new contributors because its easy to fix

Comments

@HealthyPear
Copy link
Contributor

Every time I plot a polygon with a specifying the global color I get this warning

[......]/starplot/base.py:491: UserWarning: Setting the 'color' property will override the edgecolor or facecolor properties.
patch = patches.Polygon(

When plotting many circles or ellipses this floods quickly the stderr output and can be quite annoying.

Personally I don't thing this warning is needed as this behaviour is clearly explained in the documentation:
https://starplot.dev/reference-styling/#starplot.styles.PolygonStyle

Another solution might be applying a configurable warning filter to plot classes or even logging.

@steveberardi
Copy link
Owner

Yeah, this warning should be silenced. Starplot already silences a few other noisy warnings, so I'll add this one to the list 👍

@HealthyPear
Copy link
Contributor Author

the more I think about it the more I like the option of making this configurable

@steveberardi
Copy link
Owner

hahaha, I was thinking the same thing. There's an undocumented debug param to plot constructors that I use to log info when debugging, so I was thinking of enabling all warnings when that's set to True -- maybe it's worth a separate parameter though, e.g. suppress_warnings (default would be True)

@steveberardi steveberardi added enhancement New feature or request good first issue Good issue for new contributors because its easy to fix labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good issue for new contributors because its easy to fix
Projects
None yet
Development

No branches or pull requests

2 participants