Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change how R stacks Transparency

Right now, when I produce a scatter plot with transparency in R, it looks like, when two points stack, each with transparency alpha, the cell gets transparency min(1, 2*alpha). Instead, I'd like it to get transparency 1 - (1 - alpha)^2, in order to preserve differentiation between cells with really high density without having a really low transparency. I know there are other solutions for a scatter plot, but I'm really interested in doing this for stacking bootstrapped geom_smoother lines, with which I don't know how else to solve the problem.

like image 302
user3490303 Avatar asked Feb 21 '26 17:02

user3490303


1 Answers

No, it is not possible in R graphics devices.

like image 58
hadley Avatar answered Feb 23 '26 07:02

hadley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!