# NOT RUN {
ggplot(iris, aes(x=Sepal.Length, y=Species, group=Species)) +
geom_joy2() +
scale_y_discrete(expand=c(0.01, 0)) +
scale_x_continuous(expand=c(0.01, 0)) +
theme_joy()
# set the scale argument in `geom_joy2()` to determine how much overlap there is among the plots
ggplot(diamonds, aes(x=price, y=cut, group=cut)) +
geom_joy2(scale=4) +
scale_y_discrete(expand=c(0.01, 0)) +
scale_x_continuous(expand=c(0.01, 0)) +
theme_joy()
# }
Run the code above in your browser using DataLab