mjskay / tidybayes

Bayesian analysis + tidy data + geoms (R package)
http://mjskay.github.io/tidybayes
GNU General Public License v3.0
718 stars 59 forks source link

Support for alpha transparency on the fill of eyeplot? #163

Closed helske closed 5 years ago

helske commented 5 years ago

It seems that geom_eye doesn't support alpha transparency directly. I tried to hack around it by using scale_alpha_manual but the also the line range becomes transparent. Any change of adding support for alpha? Related to this, it would be nice to have an option to color the edges of the eyes as well in some cases.

mjskay commented 5 years ago

Definitely on both. These options will likely be coming when I rewrite those geoms this summer (see #84). I've added a note there so I remember to address this, so I'll close this for now.

In the mean time, here are some workarounds depending on what you're trying to do:

ggplot(...) +
  geom_eye()

Becomes this:

ggplot(...) +
  geom_violin() +
  stat_pointinterval()

Then you can set alpha on the geom_violin().

Similar combinations work for geom_eyeh() and geom_halfeyeh() (though for the latter you would use ggridges::geom_density_ridges() instead of a violin).

mjskay commented 5 years ago

If you're curious, this should be fixed in the next release via #84 (currently the fixed version is on the meta_geom branch).