biPlot.default: Biplot

View source: R/biPlot.default.R

biPlot.defaultR Documentation

Biplot

Description

Produces a biplot, which is a plot of two different types of data on the same graph.

Usage

## Default S3 method:
biPlot(x, y, separate.axes = TRUE, xPlot = list(name
  = "observations", what = "points", type = "solid", width = "standard",
  symbol = "circle", filled = TRUE, size = 0.05, color = "black"),
  yPlot = list(name = "variables", width = "color", size = 0.2, color =
  "darkblue", symbol = "arrow", filled = FALSE),
  xPlotLabels = list(labels = "rownames", dir = "NE", size = 8, offset =
  0.35), yPlotLabels = list(labels = "colnames", dir = "Auto", size = 8,
  offset = 0.35, color = "darkblue"), ylabels = 5, xlabels = 5,
  ylabels2 = 5, xlabels2 = 5, xtitle = "", ytitle = "",
  xtitle2 = "", ytitle2 = "", range.factor = 1.25, caption = "",
  margin = c(NA, NA, NA, NA), ...)

Arguments

x

a 2-column matrix of x- (column 1) and y- (column 2) coordinates for observations or equivalent.

y

a 2-column matrix of x- (column 1) and y- (column 2) coordinates for variables or equivalent.

separate.axes

logical, if TRUE, then plot x and y data on separate axes.

xPlot

control information to plot the x data. See setPlot for a description of the parameters.

yPlot

control information to plot the y data. See setPlot for a description of the parameters. For yPlot, symbol can be "arrow" to indicate that an arrow is to be drawn from the origin.

xPlotLabels

control information for the x data labels. See Details.

yPlotLabels

control information for the y data labels. See Details.

ylabels

set y-axis labels for x data. See linearPretty for details.

xlabels

set x-axis labels for x data. See linearPretty for details.

ylabels2

set y-axis labels for y data. See linearPretty for details.

xlabels2

set x-axis labels for y data. See linearPretty for details.

xtitle

x-axis title (also called x-axis caption) for x data.

ytitle

y-axis title (also called y-axis caption) for x data.

xtitle2

x-axis title (also called x-axis caption) for y data.

ytitle2

y-axis title (also called y-axis caption) for y data.

range.factor

a numeric factor by which to expand the axis ranges so that labels can be drawn.

caption

the figure caption.

margin

set the plot area margins, in units of lines of text. Generally all NA or the output from setGraph if appropriate.

...

not used, required for other methods.

Details

The xPlotLabels and yPlotLabels arguments must be tagged lists with these components:

labels

the labels. For xPlotLabels, "rownames" means use the row names from x to generate the labels. For yPlotLabels, "colnames" means use the column names from y to generate the labels. Otherwise a character vector of the labels.

dir

the direction the label text is placed from the object.

size

the size of the label text.

offset

the distance the labels is placed relative to the object.

color

the color of the label text.

Value

Information about the graph

Note

A call should be made to setPage to set up the graphics environment before calling biPlot.

See Also

setPage, biPlot


USGS-R/smwrGraphs documentation built on Oct. 11, 2022, 6:11 a.m.