Learn R Programming

scape (version 1.0-4)

plotN: Plot Numbers at Age

Description

Plot scape model predicted numbers at age.

Usage

plotN(model, what="d", years=NULL, ages=NULL, axes=TRUE,
      same.limits=TRUE, div=1, log.transform=FALSE, base.log=10,
      main="", xlab="", ylab="", cex.main=1.2, cex.lab=1, cex.strip=0.8,
      cex.axis=0.8, las=what == "b", tck=c(1,what=="b")/2,
      tick.number=10, lty.grid=3, col.grid="white", pch=16,
      cex.points=1, col.points="black", ratio.bars=3, col.bars="grey",
      plot.it=TRUE, ...)

Arguments

model
fitted scape model.
what
what should be plotted: "d"[efault], "i"[nitial year], "r"[ecruitment], "y"[ear panels], "b"[ubble plot].
years
vector of numbers indicating which years should be plotted (all by default).
ages
vector of numbers indicating which ages should be plotted (all by default).
axes
whether axis values should be plotted.
same.limits
whether panels should have same y-axis limits.
div
denominator to shorten values on y axis.
log.transform
whether values should be log-transformed.
base.log
logarithm base.
main
main title.
xlab
x-axis label.
ylab
y-axis label.
cex.main
size of main title.
cex.lab
size of axis labels.
cex.strip
size of strip labels.
cex.axis
size of tick labels.
las
orientation of tick labels: 0=parallel, 1=horizontal, 2=perpendicular, 3=vertical.
tck
tick mark length.
tick.number
number of tick marks.
lty.grid
line type of gridlines.
col.grid
colour of gridlines.
pch
symbol for points.
cex.points
size of points.
col.points
colour of points.
ratio.bars
width of bars.
col.bars
colour of bars.
plot.it
whether to draw plot.
...
passed to xyplot.

Value

  • When plot.it=TRUE, a trellis plot is drawn and a data frame is returned, containing the data used for plotting. When plot.it=FALSE, a trellis object is returned.

concept

Fisheries stock assessment

Details

The "d"[efault] plot is a combination of "i"[nitial year] and "r"[ecruitment].

See Also

Fitted Coleraine models can be imported using importRes. Trellis plot details can be studied from the Lattice help page.

Examples

Run this code
plotN(x.cod, div=1000, xlab=c("Age (years)","Year"),
      ylab=c("Individuals (million)","One-year-olds (million)"))

plotN(x.cod, "b", xlab="Age (years)", ylab="Year", cex.points=0.7)

plotN(x.cod, "y", div=1000, ages=3:10, xlim=c(2,11), xlab="Age",
      ylab="Individuals (million)", cex.strip=0.7, cex.axis=0.7,
      tck=0.5)

Run the code above in your browser using DataLab