gplot.factor: Plotting factor variables

View source: R/gplots.R

gplot.factorR Documentation

Plotting factor variables

Description

This function implements a scatterplot for factor arguments for the generic gplot function.

If y is missing gbarplot is produced; for numeric y gboxplot is used; for a factor y a gspineplot is shown; and for any other type of y, the next gplot method is called, normally gplot.default.

Usage

## S3 method for class 'factor'
gplot(
  x,
  y,
  legend.text = NULL,
  ...,
  grid = TRUE,
  col.grid = "grey90",
  col.acc = "white"
)

Arguments

x, y

numeric or factor. y may be missing.

legend.text

character vector for annotation of y axis in the case of a factor y: defaults to levels(y). This sets the yaxlabels argument of spineplot.

...

Further arguments to barplot, boxplot, spineplot or plot as appropriate. All of these accept graphical parameters (see par) and annotation arguments passed to title and axes = FALSE. None accept type.

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.