stiffPlot: Stiff Diagrams

View source: R/stiffPlot.R

stiffPlotR Documentation

Stiff Diagrams

Description

Adds a Stiff diagram to an existing graph or produces a tabular presentation of Stiff diagrams in a graph.

Usage

stiffPlot(cations, anions, Stiff = list(fill = "gray50", outline =
  "black", height = 2/3, bar = "black"), yaxis.orient = "table",
  yaxis.order = "none", xaxis.range = c(NA, NA), ylabels = "Auto",
  xlabels = 7, catlabels = "Auto", anlabels = "Auto",
  xtitle = "Milliequivalents per liter", ytitle = "", caption = "",
  margin = c(NA, NA, NA, NA), ...)

addStiff(x, y, width, height, cations, anions, Stiff = list(fill =
  "gray50", outline = "black", height = 2/3, bar = "black"),
  xaxis.range = c(NA, NA), catlabels = "", anlabels = "",
  current = list(yaxis.log = FALSE, yaxis.rev = FALSE, xaxis.log =
  FALSE))

Arguments

cations

a matrix of cation data. Each row corresponds to the respective x and y value. Missing values are not permitted for addStiff, but are permitted for stiffPlot and result in no Stiff Diagram for that entry.

anions

a matrix of anion data. Each row corresponds to the respective x and y value. Missing values are not permitted for addStiff, but are permitted for stiffPlot and result in no Stiff Diagram for that entry.

Stiff

a list describing the Stiff diagram. See Details.

yaxis.orient

orientation of the y-axis values, must be either "table" or "grid." "Table" is sorted from top to bottom, "grid" is sorted from bottom to top.

yaxis.order

the order of the y-axis values, must be one of "none," "ascending," or "descending."

xaxis.range

the range of the x-axis corresponding to width in the call to addStiff or the range of the x-axis in the call to stiffPlot. See Details.

ylabels

set up y-axis labels.

xlabels

set up x-axis labels.

catlabels

labels for the values of the cations. For addStiff, the labels are applied to each Stiff diagram and for stiffPlot, the labels are stored and drawn on the explanation addExplanation.

anlabels

labels for the values of the anions. For addStiff, the labels are applied to each Stiff diagram and for stiffPlot, the labels are stored and drawn on the explanation addExplanation.

xtitle

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

ytitle

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

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.

x

the x-coordinates to place the center of each Stiff diagram. Missing values are permitted, but result in no Stiff diagram.

y

the y-coordinates to place the center of each Stiff diagram. Missing values are permitted, but result in no Stiff diagram.

width

the width in inches of the Stiff diagrams.

height

the height in inches of the Stiff diagrams.

current

the current plotting parameters. Typically, this would be the output from one of the graph creation functions like xyPlot.

Details

The units of the cation and anion data are generally in milli-equivalents per liter.

The Stiff argument must be a tagged list with these components:

fill

the name of the color to fill each Stiff diagram. Must be a valid color name.

outline

the name of the color to draw the outline or border for each Stiff diagram. Must be a valid color name.

height

the height of each Stiff diagram, proportional to the overall height for each Stiff diagram.

bar

the color of the central bar. May be "none" for no central bar.

The values for axis.range must be expressed as a negative value for the cation data, left-hand side of the diagram, and a positive value for anion data, right-hand side of the diagram.

Value

Information about the graph.

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

addStiff, xyPlot

Examples

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

## End(Not run)

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