View source: R/scale_side_mirrored.R
scale_side_mirrored | R Documentation |
This scale creates mirrored slabs for the side
aesthetic of the geom_slabinterval()
and geom_dotsinterval()
family of geoms and stats. It works on discrete variables
of two or three levels.
scale_side_mirrored(start = "topright", ..., aesthetics = "side")
A ggplot2::Scale representing a scale for the side
aesthetic for ggdist geoms. Can be added to a ggplot()
object.
Matthew Kay
Other ggdist scales:
scale_colour_ramp
,
scale_thickness
,
sub-geometry-scales
library(dplyr)
library(ggplot2)
set.seed(1234)
data.frame(
x = rnorm(400, c(1,4)),
g = c("a","b")
) %>%
ggplot(aes(x, fill = g, side = g)) +
geom_weave(linewidth = 0, scale = 0.5) +
scale_side_mirrored()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.