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
Patch.update_from does not preserve the facecolor when alpha is set. #842
Comments
There is a bug, but I think it is not what you think it is. Setting alpha to anything but 0.0 or None when fc is 'none' is a contradiction and probably should throw an exception. Furthermore, is it pretty much accepted that the alpha kwarg should override the alpha part of any other colors (so, should the edgecolor in this example be transparent or opaque?). |
Of course, we could adopt semantics where setting a color to 'none' overrides the alpha setting, while letting the alpha override the opaque blue for the edge color in this example... This really begs the need for a Color dtype or something. |
The alpha mess never ends. 'none' really should be different from alpha = 0; but since all we have is RGBA, it was convenient to implement 'none' by setting A to zero. I think corner cases such as the one pointed out here by @leejjoon will not be solved cleanly short of a major overhaul of color handling, so I am closing this issue. |
I've reserved MEP21 for an overhaul of color. Finding the time is hard, but short of that, I think it's helpful to keep track of these "major projects" that need to be done. |
Here is an example.
And the second assertion fails.
fc="none" sets facecolor to (0,0,0,0) but when update_from is called,
somehow its alpha value is overridden to 1 (because of alpha=1).
This seems to be a bug but others may think differently.
The text was updated successfully, but these errors were encountered: