Skip to content

Feature request: Vary colour/fill along ridgeline #82

@roaldarbol

Description

@roaldarbol

Hey Claus - thanks for some amazing work with ggridges!

I'm using geom_ridgeline, and would like to be able to colour the line by a variable (e.g. the same as height). Although it's possible to colour the fill/colour using geom_density_ridges_gradient, it doesn't seem to be possible in other cases, e.g. for a time series.

Here's a minimal example of what I'd like to be able to do:

lincoln_weather %>% 
  mutate(
         date = as_date(CST),
         day_n = mday(date)) %>% 
  filter(as_date(date) < as_date("2017-01-01")) %>% 
ggplot(aes(x = day_n, y = Month, height = `Mean Temperature [F]`, fill = `Mean Temperature [F]`)) +
  geom_ridgeline(scale = 0.05)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions