piper-class {hydrogeo} | R Documentation |
piper
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.
## 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)
.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 |
initialize
: Initialiser
labelAxes
: Label the axes
plot
: Plot an object of class piper
show
: Show an object of class piper
Ca
Object of class vector
— Calcium
Mg
Object of class vector
— Magnesium
Cl
Object of class vector
— Chloride
SO4
Object of class vector
— Sulphate
anion.x
x coordinate of the point on the anion triangle (internal)
anion.y
y coordinate of the point on the anion triangle (internal)
cation.x
x coordinate of the point on the cation triangle (internal)
cation.y
y coordinate of the point on the cation triangle (internal)
diamond.x
x coordinate of the point on the diamond (internal)
diamond.y
y coordinate of the point on the anion diamond (internal)
IDs
Object of class vector
of sample identifiers
pt.col
Object of class vector
of colours for points
pt.pch
Object of class vector
of symbols for points
call
Object of class character
— call that created it
Myles English myles@rockhead.biz
A. Zaporozec, “Graphical interpretation of water quality data,” Ground Water 10, no. 2 (1972): 32–43.
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 )