I am trying to make an area plot with the different areas are overlaid on one another rather than stacked.
I have a dataframe that looks like this:
Using tidyverse:
tidyverse
library(forcats) p + geom_area(aes(colour = variable, fill= fct_reorder(variable, value, .desc = TRUE)), position = 'identity')
Remove .desc = TRUE if it does the opposite of what you want.
.desc = TRUE