panel_box: Panel 'boxplot'

View source: R/panels.R

panel_boxR Documentation

Panel boxplot

Description

Panel with boxplots.

Usage

panel_box(
  data,
  y = seq.int(length(data)),
  col = 1L,
  axes = FALSE,
  logx = FALSE,
  add = TRUE,
  panel.first = NULL,
  panel.last = NULL,
  ...
)

Arguments

data

a list or data frame for each boxplot

y

y-coordinates where each row of data is plotted

col

color for each, recycled as needed

axes

logical; if TRUE, the x-axis is drawn

logx

logical; if TRUE, use a logarithmic x-axis

add

logical; if TRUE, adds to an existing plot; otherwise, a new plot is created first

panel.first, panel.last

expressions to be evaluated before and after any plotting; see plot.default

...

additional arguments passed to boxplot

See Also

Other panel functions: panel_ci(), panel_tplot()

Examples

set.seed(1)
l <- replicate(5, rnorm(10), simplify = FALSE)

panel_box(l, add = FALSE, axes = FALSE)

panel_box(l, add = FALSE, axes = FALSE,
  panel.first = rect(-1, 0, 1, 6, col = 'grey90', border = NA),
  panel.last = abline(v = 0, lwd = 2, col = 'red')
)


raredd/forest documentation built on Feb. 19, 2024, 9:22 p.m.