| piper-class {hydrogeo} | R Documentation |
Class piper
Description
Objects of this class are plotable as Piper-Hill diagrams. A dataframe of major ions as percentages can be used to initialise a piper object.
Usage
## S4 method for signature 'piper'
initialize(.Object, l, ..., call = NULL, pt.col = NULL)
## S4 method for signature 'piperplot'
labelAxes(x, cex.axis = 0.35, side = -1, ...)
## S4 method for signature 'piper'
plot(x, type = "p", cex = 0.75, ...)
## S4 method for signature 'piper'
show(object)
Arguments
.Object |
object of class piper |
l |
list of data, see 'Examples' below |
... |
additional arguments, as for |
call |
the call that asked for the new piper object |
pt.col |
Object of class |
x |
an object of class piperplot |
cex.axis |
magnification to be used for axis annotation relative to the current setting of 'cex', see help("par") |
side |
integer between 1 and 10 specifying which side to lable, the default is to label all |
type |
what type of plot should be drawn, only "p" for *p*oints is useful |
cex |
magnification to be used for symbols relative to the current setting of 'cex', see help("par") |
object |
an object of class piper |
Methods (by generic)
-
initialize: Initialiser -
labelAxes: Label the axes -
plot: Plot an object of classpiper -
show: Show an object of classpiper
Slots
CaObject of class
vector— CalciumMgObject of class
vector— MagnesiumClObject of class
vector— ChlorideSO4Object of class
vector— Sulphateanion.xx coordinate of the point on the anion triangle (internal)
anion.yy coordinate of the point on the anion triangle (internal)
cation.xx coordinate of the point on the cation triangle (internal)
cation.yy coordinate of the point on the cation triangle (internal)
diamond.xx coordinate of the point on the diamond (internal)
diamond.yy coordinate of the point on the anion diamond (internal)
IDsObject of class
vectorof sample identifierspt.colObject of class
vectorof colours for pointspt.pchObject of class
vectorof symbols for pointscallObject of class
character— call that created it
Author(s)
Myles English myles@rockhead.biz
References
A. Zaporozec, “Graphical interpretation of water quality data,” Ground Water 10, no. 2 (1972): 32–43.
Examples
showClass("piper")
l <- list( Ca = c(43,10,73,26,32),
Mg = c(30,50,3,14,12),
Cl = c(24,10,12,30,43),
SO4 = c(24,10,12,30,43))
lp <- piper(l)
plot( lp, main="Piper-Hill Diagram of Water Quality" )
# change symbols and colours to differentiate water type groups
lp@pt.pch = c(2,2,4,4,4)
lp@pt.col = c(0,1,0,1,2)
# use larger symbols
plot( lp, main="Piper-Hill Diagram of Water Quality", cex=1.4 )