piperPlot: Piper Diagram

View source: R/piperPlot.R

piperPlotR Documentation

Piper Diagram

Description

Produces a Piper diagram.

Usage

piperPlot(xCat, yCat, zCat, xAn, yAn, zAn, 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 = FALSE, grids = !ticks,
  xCat.title = "Calcium", yCat.title = "Magnesium",
  zCat.title = "Sodium plus Potassium",
  xAn.title = "Chloride, Fluoride, Nitrite plus Nitrate",
  yAn.title = "Carbonate plus Bicarbonate", zAn.title = "Sulfate",
  x.yCat.title = "Calcium plus Magnesium",
  x.zAn.title = "Sulfate plus Chloride", units.title = "Percent",
  caption = "", margin = c(NA, NA, NA, NA))

Arguments

xCat

data for the cation x-axis, generally calcium.

yCat

data for the cation y-axis, generally magnesium.

zCat

data for the cation z-axis, generally sodium plus potasium.

xAn

data for the anion x-axis, generally chloride plus other minor constituents.

yAn

data for the anion y-axis, generally carbonate plus bicarbonate.

zAn

data for the anion z-axis, generally sulfate.

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.

xCat.title

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

yCat.title

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

zCat.title

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

xAn.title

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

yAn.title

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

zAn.title

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

x.yCat.title

title for the cation x- and y-axis for the central Piper graph.

x.zAn.title

title for the anion x- and z-axis for the central Piper graph.

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."

The units for xCat, yCat, zCat, xAn, yAn, and zAn should be in milli-equivalents.

Value

Information about the graph and current plot.

Note

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

References

Hem J.D., 1989, Study and interpretation of the chemical characteristics of natural water: U.S. Geological Survey Water-Supply Paper 2254, 263 p.

See Also

setPage, setMultiPlot, ternaryPlot, addPiper

Examples

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

## End(Not run)

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