gplot.histogram: gplot histograms

View source: R/gplots.R

gplot.histogramR Documentation

gplot histograms

Description

These are methods for objects of class "histogram", typically produced by ghist.

Usage

## S3 method for class 'histogram'
gplot(
  x,
  freq = equidist,
  density = NULL,
  angle = 45,
  col = "white",
  border = par("fg"),
  lty = NULL,
  main = paste("Histogram of", paste(x$xname, collapse = "\n")),
  sub = NULL,
  xlab = x$xname,
  ylab,
  xlim = range(x$breaks),
  ylim = NULL,
  axes = TRUE,
  labels = FALSE,
  add = FALSE,
  ann = TRUE,
  grid = TRUE,
  col.grid = "grey90",
  col.acc = "white",
  ...
)

Arguments

x

a histogram object, or a list with components density, mid, etc, see hist for information about the components of x.

freq

logical; if TRUE, the histogram graphic is to present a representation of frequencies, i.e, x$counts; if FALSE, relative frequencies (probabilities), i.e., x$density, are plotted. The default is true for equidistant breaks and false otherwise.

angle, density

select shading of bars by lines: see rect.

col

a colour to be used to fill the bars. The default has been changed from NULL (unfilled bars) only for R 4.2.0 for consistency with the change in hist.default for R 4.0.0.

border

the color of the border around the bars.

lty

the line type used for the bars, see also lines.

main, sub, xlab, ylab

these arguments to title have useful defaults here.

xlim, ylim

the range of x and y values with sensible defaults.

axes

logical, indicating if axes should be drawn.

labels

logical or character. Additionally draw labels on top of bars, if not FALSE; if TRUE, draw the counts or rounded densities; if labels is a character, draw itself.

add

logical. If TRUE, only the bars are added to the current plot. This is what lines.histogram(*) does.

ann

logical. Should annotations (titles and axis titles) be plotted?

grid

logical; if TRUE, a background grid will be drawn

col.grid

grid color

col.acc

grid accent color

...

further graphical parameters to title and axis.


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