I am using the ggjoy
package to make a joy plot in R, My problem is that the lines forming the rims of the density plots look jagged.
I want my plot to have smooth curves like the one below:
My current R code is as follows:
library (ggjoy)
p <- ggplot(data = agedata1,
mapping = aes(x = Age,
y = factor(Mth,
ordered = TRUE)))
p + geom_joy(alpha = 0.6, fill = "lightblue", scale = 1.5) +
scale_x_continuous(breaks = c(25, 35, 45, 65, 75)) +
scale_y_discrete(expand = c(0.01, 0)) +
labs(x = "Age", y = NULL,
title = "Age Distribution by Month") +
theme_joy() +
theme(plot.title = element_text(size = 10, face = "bold"))
How do I achieve this?