-
Notifications
You must be signed in to change notification settings - Fork 7
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
overlapping points are semi-transparent #25
Comments
Hello, The difference here is that ggplot and base R use the usual "layered" RGBA blending, which "hides" previous points behind new ones (just as the blue one behind the green ones in your case). Scattermore uses RGBWT by default, which always blends all layers equally. It's certainly not very "nice" for a few huge points like in your example here, but it helps a lot for huge amounts of little points (which is the target use-case of scattermore). E.g., for single-cell data vis, this makes sure you don't accidentally miss a small cluster in your picture. If you want to have some points hidden explicitly, the best way is to use the lower-level API (e.g. this and this) to create RGBA layers and blend them in your preferred order. We don't have dedicated "frontend" functionality for this because it's a completely different use-case. Hope this explanation helps :] I'll leave this open for now; maybe I'll find a bit of time to add the low-level-API solution to the docs at some point. |
Thank you for the clarification. Would you be able to provide an example of how to remove the blending? I was just using big points to have a very clear example. For little points, I agree blending can be helpful, but not necessarily. For example, if you have red and blue points, purple areas are mixed and blending makes sense. If you have red, blue, and purple points, then purple areas can be red+blue, red+blue+purple, or just purple, so blending introduces ambiguity. |
I am having some issues with the alpha parameter.
This is the ggplot2 version:
And the scattermore version:
As you can see, when the points are overlapping, they are semi-transparent if they are different colors.
I am using scattermore 1.2 and ggplot2 3.5.1.
The text was updated successfully, but these errors were encountered: