| scale_point {ggridges} | R Documentation |
These are various scales that can be applied to point aesthetics, such as
point_color, point_fill, point_size. The individual scales all have the
same usage as existing standard ggplot2 scales, only the name differs.
scale_point_shape(): Equivalent to scale_shape().
scale_point_size_continuous(): Equivalent to scale_size_continuous().
scale_point_color_hue(): Equivalent to scale_colour_hue().
scale_point_fill_hue(): Equivalent to scale_fill_hue().
scale_point_color_gradient(): Equivalent to scale_colour_gradient(). Note that this scale cannot
draw a legend, however, because of limitations in guide_colorbar().
scale_point_fill_gradient(): Equivalent to scale_fill_gradient(). Note that this scale cannot
draw a legend, however, because of limitations in guide_colorbar().
See scale_vline_color_hue() for specific scales for vline aesthetics
and scale_discrete_manual() for a general discrete scale.
library(ggplot2)
# default scales
ggplot(iris, aes(x=Sepal.Length, y=Species, fill = Species)) +
geom_density_ridges(aes(point_color = Species, point_fill = Species,
point_shape = Species),
alpha = .4, jittered_points = TRUE) +
theme_ridges()
# modified scales
ggplot(iris, aes(x=Sepal.Length, y=Species, fill = Species)) +
geom_density_ridges(aes(point_color = Species, point_fill = Species,
point_shape = Species),
alpha = .4, jittered_points = TRUE) +
scale_fill_hue(l = 50) +
scale_point_color_hue(l = 20) +
scale_point_fill_hue(l = 70) +
scale_discrete_manual("point_shape", values = c(21, 22, 23)) +
theme_ridges()