wilkelab / ggridges

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

Feature request: Manual gradient along Y-axis #84

Open cgrandin opened 1 year ago

cgrandin commented 1 year ago

Hi, thanks for the package, it's great.

I was wondering if it is possible to have a manually-defined gradient on the y-axis? So for example to have a starting (minimum) colour and ending (maximum) colour, in this case white and black respectively to make a really nice looking shaded plot.

This is for aesthetics mostly, but also aids the eye in finding peaks which reach the maximum. In this particular case the minimum and maximum are 0 and 1 although that shouldn't matter.

Thank you

image

clauswilke commented 1 year ago

This feature could be implemented in principle now that grid supports gradients. But it's not high on my priority list. If somebody wants to take a stab I'm happy to consider a PR.