wilkelab / ggridges

Ridgeline plots in ggplot2
https://wilkelab.org/ggridges
GNU General Public License v2.0
412 stars 31 forks source link

Feature Request: Trim Edges #57

Open James-G-Hill opened 4 years ago

James-G-Hill commented 4 years ago

Is it possible to have a setting for Trim identical to that in the geom_density?

https://ggplot2.tidyverse.org/reference/geom_density.html

The following stack exchange issue asks how best to do it & shows a workaround, but that workaround also results in the distributions appearing differently:

https://stackoverflow.com/questions/49906240/stop-geom-density-ridges-from-showing-non-existent-tail-values/50011428#50011428

Maybe there's a good reason not to but I have encountered a situation where my audience was confused by the slope appearing outside of the expected range of values.