Incredible package. Thank you.
library(ggplot2)
library(ggjoy)
d <- data.frame(x = rep(1:5, 3), Year = c(rep(1979, 5), rep(1980, 5), rep(1981, 5)),
height = c(0, 1, 3, 4, 0, 1, 2, 3, 5, 4, 0, 5, 4, 4, 1))
ggplot(d, aes(x, y = Year, height = height, group = Year)) +
geom_ridgeline(scale = 0.2)
Using different scales for y and height seem to be an issue. But if do something like this with geom_joy
it is ok:
ggplot(d, aes(x, y = Year, height = height, group = Year)) +
geom_joy(stat = "identity", scale = 1)
My goal is to plot a time series where I set height to continuous variable, plot a year on the y-axis and then plot day-month on the x-axis. This provides a VERY nice visualization of data by year. I can do this (basically the 1st or 2nd example). However the documentation has thrown me and I wanted to make sure that I was on the right side visualization conventions. So ultimately the question is, in what instances, if any,is it ok for the height
and y
argument to be of different scales?