Closed ghost closed 4 years ago
Typing the following returns the function parametes for geom_density_ridges:
geom_density_ridges
require(ggplot2) require(ggridges) require(ggpubr) require(dplyr) arcgs(geom_density_ridges)
result:
geom_density_ridges function (mapping = NULL, data = NULL, stat = "density_ridges", position = "points_sina", panel_scaling = TRUE, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...) { layer(data = data, mapping = mapping, stat = stat, geom = GeomDensityRidges, position = position, show.legend = show.legend, inherit.aes = inherit.aes, params = list(na.rm = na.rm, panel_scaling = panel_scaling, ...)) } <bytecode: 0x00000000195098a0> <environment: namespace:ggridges>
However, there is no sign of parameter jittered_points.
jittered_points
I was following a tutorial on how to use ggridges and was interested in creating a rug simulation underneath each density plot with jittered points, such as in this example: https://cran.r-project.org/web/packages/ggridges/vignettes/introduction.html
ggridges
Here is an example code:
p1 <- ggplot(data=df, aes(x=xVar, y=factorVar, group=factorVar, fill=stat(x))) p1 <- p1 + geom_density_ridges(jittered_points=TRUE, scale=0.95, rel_min_height=0.01, point_shape='|', point_size=3, size=0.25, stat="identity", alpha=0.2, position=position_points_jitter(height=0)) p1 <- p1 + scale_color_brewer(palette="YlGnBu") p1 %>% print()
Issue
Typing the following returns the function parametes for
geom_density_ridges
:result:
However, there is no sign of parameter
jittered_points
.What happened to
jittered_points
?I was following a tutorial on how to use
ggridges
and was interested in creating a rug simulation underneath each density plot with jittered points, such as in this example: https://cran.r-project.org/web/packages/ggridges/vignettes/introduction.htmlHere is an example code: