3

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.

1 Answers1

2

No, it is not possible in R graphics devices.

hadley
  • 102,019
  • 32
  • 183
  • 245
  • 2
    to expand on this a little bit: transparency is generally handled at a lower level than R, e.g. by whatever machinery is present in the definition/rendering of Windows graphics windows/Quartz windows/PNGs/PDFs -- R just says "this is a transparent colour" and the computations are done within whatever piece of software is handling the display. In principle you could (e.g.) write your own graphics renderer that changed the rules for transparency (good luck ...) – Ben Bolker Apr 04 '14 at 02:12