gplot.table: gplot method for 'table' objects

View source: R/gplots.R

gplot.tableR Documentation

gplot method for table objects

Description

This is a method of the generic gplot function for (contingency) table objects. Whereas for two- and more dimensional tables, a mosaicplot is drawn, one-dimensional ones are plotted as bars.

Usage

## S3 method for class 'table'
gplot(
  x,
  type = "h",
  ylim = c(0, max(x)),
  lwd = 2,
  xlab = NULL,
  ylab = NULL,
  frame.plot = is.num,
  ...,
  grid = TRUE,
  col.grid = "grey90",
  col.acc = "white"
)

Arguments

x

a table (like) object.

type

plotting type.

ylim

range of y-axis.

lwd

line width for bars when type = "h" is used in the 1D case.

xlab, ylab

x- and y-axis labels.

frame.plot

logical indicating if a frame (box) should be drawn in the 1D case. Defaults to true when x has dimnames coerce-able to numbers.

...

further graphical arguments, see plot.default. axes = FALSE is accepted.

grid

logical; if TRUE, a background grid will be drawn

col.grid

grid color

col.acc

grid accent color


raredd/plotr documentation built on Nov. 19, 2023, 4:09 a.m.