Learn R Programming

AquaEnv (version 1.0-4)

plot.aquaenv: plot.aquaenv

Description

PUBLIC function: high level plot function for objects of class aquaenv

Arguments

x
object of class aquaenv
xval
only valid if bjerrum=FALSE: a vector of the (maximal) length of the elements of aquaenv against which they are to be plotted
what
a list of names of the elements of aquaenv that are to be plotted, if not supplied and bjerrum=FALSE and cumulative=FALSE: all elements are plotted, if not supplied and bjerrum=TRUE then what is set to be c("CO2", "HCO3", "CO3", "BOH3", "BOH4", "OH", "H3PO4", "H2PO4", "HPO4", "PO4", "SiOH4", "SiOOH3", "SiO2OH2", "H2S", "HS", "S2min", "NH4", "NH3", "H2SO4", "HSO4", "SO4", "HF", "F", "HNO3", "NO3", "HNO2", "NO2"), needs to be supplied for cumulative=TRUE
bjerrum
flag: TRUE = a bjerrum plot is done (by calling bjerrumplot)
cumulative
flag: TRUE = a cumulative plot is done (by calling cumulativeplot)
newdevice
flag: if TRUE, new plot device is opened
setpar
flag: if TRUE parameters are set with the function par
xlab
x axis label
log
only valif if bjerrum=TRUE: should the plot be on a logarithmic y axis?
total
only valid if cumulative=TRUE: should the sum of all elements specified in what be plotted as well?
device
the device to plot on; default: "x11" (can also be "eps" or "pdf")
filename
filename to be used if "eps" or "pdf" is selected for device
size
the size of the plot device; default: 12 (width) by 10 (height) inches
ylim
standard plot parameter; if not supplied it will be calculated by range() of the elements to plot
lwd
standard plot parameter; width of the lines in the plot
mgp
standard plot parameter; default: axis title on line 1.8, axis labels on line 0.5, axis on line 0
mar
standard plot parameter; default: margin of 3 lines bottom and left and 0.5 lines top and right
oma
standard plot parameter; default: no outer margin
palette
only valid if bjerrum=TRUE or cumulative=TRUE: a vector of colors to use in the plot (either numbers or names given in colors())
legendposition
only valid if bjerrum=TRUE or cumulative=TRUE: position of the legend
legendinset
only valid if bjerrum=TRUE or cumulative=TRUE: standard legend parameter inset
legendlwd
only valid if bjerrum=TRUE or cumulative=TRUE: standard legend parameter lwd: line width of lines in legend
bg
only valid if bjerrum=TRUE or cumulative=TRUE: standard legend parameter: default background color: white
y.intersp
standard legend parameter; if cumulative=TRUE then default: 1.2 lines space between the lines in the legend
...
further arguments are passed on to the plot function

Details

Top level generic usage is
plot.aquaenv(x, xval, what=NULL, bjerrum=FALSE,
             cumulative=FALSE, newdevice=TRUE, setpar=TRUE,
	     device="x11", ...)
Generic usages for standard plotting are
plot.aquaenv(x, xval, ...)
plot.aquaenv(x, xval, what, mfrow=c(1,1), size=c(7,7), ...)
Generic usage for creating a bjerrum plot is
plot.aquaenv(x, what, log=FALSE, palette=NULL,
             device="x11", filename="aquaenv",
             size=c(12,10), ylim=NULL, lwd=2, xlab="free scale pH",
	     mgp=c(1.8, 0.5, 0), mar=c(3,3,0.5,0.5), oma=c(0,0,0,0),
	     legendposition="bottomleft", legendinset=0.05,
	     legendlwd=4, bg="white", newdevice=TRUE, setpar=TRUE,
	     device="x11",...)
Generic usage for creating a cumulative plot is
plot.aquaenv(x, xval, what, total=TRUE, palette=NULL,
             device="x11", filename="aquaenv", size=c(12,10), ylim=NULL,
             lwd=2, mgp=c(1.8, 0.5, 0), mar=c(3,3,0.5,0.5), oma=c(0,0,0,0),
             legendposition="bottomleft", legendinset=0.05, legendlwd=4,
             bg="white", y.intersp=1.2, newdevice=TRUE, setpar=TRUE,
	     device="x11",...)