-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Clarify transparency in colors #24429
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
Conversation
What issue with the existing figure are you trying to address with the new figure? I honestly struggled to parse it a few times as I kept not really seeing the zorder =3 example, so I much prefer the current figure where the over and under cases are separated. I think the alpha is also maybe a drop too high and that's further not helping my ability to easily read it. |
IMHO the current figure has some issues
Overall, this a lot of noise but I don't see a clear message we want to communicate with the figure. I suspect it should have something to do with the subsequent note "Re-ordering Artists is not commutative in Matplotlib." / "Changing the order of Artists will generally change the resulting figure." The first version was not comprehensible and was changed to the second version. While correct, the statement is essentially trivial: If you change the order and thus change what is drawn on top, the result may change. The only maybe not completely trivial case is if transparency is involved. That's what I've tried to illustrate in the figure: If you draw the blue alternatively above or below the red square, the mixed region is still not the same. - Though I have to admit, that if one thinks about it for a second and considers only a slight transparency this is also clear: The result is still mostly dominated by the color in front. Reconsidering, I think the whole front/back discussion here is overemphasized and mostly beyond the scope of what we need to communicate in the context of transparency. Maybe after the equation we should just give an illustration
|
I really like your illustration cause that covers the problem of zorder not really mattering for a bunch of alpha levels and then yeah we can link out to zorder. |
Commited with the new proposal.
What do you want to communicate with that? We'd need to add an alpha to the orange bar, otherwise it's quite meaningless: With alpha=0.8 but we have to say a lot more, namely the bar alpha and the changed zorder, which makes it more buy. One could also put both in one figure, but still this needs all the context information. Overall, I think the simple illustration is enough. |
I like the last one. Like it or not, people are confused by this. I don't know that we need 10 alpha values if we want to make the figure narrower. |
Agree, and I think the zorder and orange bar labels can basically go in the fig caption/side bar since they're useful annotations but not the main point. Something like: ETA: If you're worried about busy, there's a new viz paper that says that folks like heavy annotations in visualizations https://arxiv.org/abs/2209.10789 |
Ok, added the two-row exmaple. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have placement preferences but am also willing to open my own PR to move things around & I think this is much improved. Thanks for making the new figure!
…429-on-v3.6.2-doc Backport PR #24429 on branch v3.6.2-doc (DOC: Clarify transparency in colors)
…429-on-v3.6.x Backport PR #24429 on branch v3.6.x (DOC: Clarify transparency in colors)
These were replaced with embedded code in matplotlib#24429.
PR Summary
Follow-up to #24407.
======
) accordings to https://matplotlib.org/devdocs/devel/documenting_mpl.html#section-formatting