The horizontal counterpart of geom_errorbar(), for intervals that run
along x — forest plots and tornado charts.
geom_errorbarh(
mapping = NULL,
data = NULL,
color = NULL,
linewidth = NULL,
alpha = NULL,
height = NULL
)
Arguments
- mapping, data
Standard layer overrides. Requires y, xmin,
xmax.
- color, linewidth, alpha
Appearance.
- height
Cap height in y-axis units.
Value
A Layer to add with +.
Examples
d <- data.frame(g = c("a", "b"), lo = c(1, 2), hi = c(4, 5))
ggnext(d, aes(y = g, xmin = lo, xmax = hi)) + geom_errorbarh()
#> <ggnext plot>
#> data: 2 x 3
#> aes: y = g, xmin = lo, xmax = hi
#> layers: 1
#> coord: cartesian
#> mode: static