Plotting functions {CNPDIA}R Documentation

Utility functions for plotting CNPDIA and MPBDIA dynamic or steady-state model output.

Description

image2D generates a 2-D image (x=time, y=depth) of the dynamic output.

matplot1D plots how profiles change with time. These plots will have the depth on the y-axis, and will plot all profiles.

plot plots steady-state profiles, with the depth on the y-axis.

Usage


## S3 method for class 'CNPDIAdyn'
image2D(z, which, ylim = c(20, 0), 
   colkey = list(cex.clab = 0.8, line.clab = 0.5, cex.axis = 0.8), ...) 
## S3 method for class 'MPBDIAdyn'
image2D(z, which, ylim = c(20, 0),
  colkey = list(cex.clab = 0.8, line.clab = 0.5, cex.axis = 0.8), ...) 

## Default S3 method:
matplot1D(z, ...) 
## S3 method for class 'CNPDIAdyn'
matplot1D(z, which, ylim = c(20, 0), 
  type = "l", col = "grey",  lty = 1, ...) 
## S3 method for class 'MPBDIAdyn'
matplot1D(z, which, ylim = c(20, 0), 
  type = "l", col = "grey", lty = 1, ...) 

matplot1D (z, ...) 


## S3 method for class 'CNPDIAstd'
plot(x, ..., which, ylim = c(20, 0)) 
## S3 method for class 'MPBDIAstd'
plot(x, ..., which, ylim = c(20, 0)) 
  

Arguments

z

object of class CNPDIAdyn or MPBDIAdyn generated by CNPDIAdyna or MPBDIAdyna.

x

object of class CNPDIAstd or MPBDIAstd generated by CNPDIAsolve or MPBDIAsolve.

which

The name(s) of the 1-dimensional output to be plotted versus time.

ylim

The ranges of the y-axis. default it to have the y-axis extend downward, from 0 to 20 cm

colkey

A list with specifications of the color key. The default is to have a smaller title (cex.clab) and axis labels (cex.axis), the key title positioned close to the color key (line.clab), See colkey

type, col, lty

The type of plot, the color and type of the lines used for plotting

...

Any argument passed to the functions image2D and matplot.1D .

Author(s)

Karline Soetaert

Examples


# Dynamic 
  out <- CNPDIAdyna(CfluxForc = list(amp = 1))
  image2D(out, which = 1:9)
  matplot1D(out, which = 3, col = "grey") 

  
  image2D(out, which = "O2", ylim = c(10,0))

# The same but more elaborate
  O2 <- subset(out, which = "O2")
  image2D(O2, x = out[,"time"], y = CNPDIAdepth(out), ylim = c(10,0))




[Package CNPDIA version 1.0 Index]