ternaryPlot: Ternary Diagram

View source: R/ternaryPlot.R

ternaryPlotR Documentation

Ternary Diagram

Description

Produces a ternary diagram, also called a trilinear or triangular diagram.

Usage

ternaryPlot(x, y, z, Plot = list(name = "", what = "points", type =
  "solid", width = "standard", symbol = "circle", filled = TRUE, size =
  0.09, color = "black"), axis.range = c(0, 100), num.labels = 6,
  ticks = TRUE, grids = !ticks, orient = "c",
  xtitle = deparse(substitute(x)), ytitle = deparse(substitute(y)),
  ztitle = deparse(substitute(z)), units.title = "Percent",
  caption = "", margin = c(NA, NA, NA, NA))

Arguments

x

the x-axis (bottom) data.

y

the y-axis (left side) data.

z

the z-axis (right side) data. Note that x, y, and z do not need to sum to the axis range.

Plot

control parameters of the plot, see link{setMultiPlot} and Details for details.

axis.range

the range of the axes. Must be either c(0, 1) or c(0, 100).

num.labels

the number of labels to draw on each axis. Best selections are 2 giving (0, 100), 3 (0, 50, 100), 5 (0, 25, 50, 75, 100), or 6 (o, 20, 40, 60, 80, 100).

ticks

logical, if TRUE, then draw ticks.

grids

logical, if TRUE, then draw grid lines.

orient

the orientation of the graph. Must be "c" for clockwise or "a" for anti- or counter-clockwise

xtitle

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

ytitle

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

ztitle

title (also called caption) for the z-axis.

units.title

the units titles, should be either "Percent" of "Proportion" depending on axis.range.

caption

the figure caption.

margin

set up the plot area margins— ignored, included for consistency with other plotting functions in this package.

Details

The what component of the Plot argument must be either "points" or "none."

Value

Information about the graph.

Note

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

References

Lorenz D.L., 2015, smwrGraphs

See Also

setPage, setMultiPlot, piperPlot, addTernary

Examples

## Not run: 
# See for examples of ternaryPlot:
vignette(topic="PiperPlot", package="smwrGraphs")

## End(Not run)

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