A hollow box spanning ymin to ymax with a heavier line at y — the
compact summary used in dose-response and subgroup tables.
geom_crossbar(
mapping = NULL,
data = NULL,
color = NULL,
linewidth = NULL,
alpha = NULL,
width = NULL
)
Arguments
- mapping, data
Standard layer overrides. Requires x, y, ymin,
ymax.
- color, linewidth, alpha
Appearance.
- width
Box width in x-axis units.
Value
A Layer to add with +.
Examples
d <- data.frame(g = c("a", "b"), m = c(2, 3), lo = c(1, 2), hi = c(4, 5))
ggnext(d, aes(g, m, ymin = lo, ymax = hi)) + geom_crossbar()
#> <ggnext plot>
#> data: 2 x 4
#> aes: x = g, y = m, ymin = lo, ymax = hi
#> layers: 1
#> coord: cartesian
#> mode: static