plotCL {scape}R Documentation

Plot Catch at Length

Description

Plot scape model fit to catch-at-length data.

Usage

plotCL(model, what="c", fit=TRUE, series=NULL, sex=NULL, years=NULL,
       lengths=NULL, axes=TRUE, same.limits=TRUE, log=FALSE, base=10,
       eps.log=1e-5, main="", xlab="", ylab="", cex.main=1.2, cex.lab=1,
       cex.strip=0.8, cex.axis=0.8, las=!fit, tck=c(1,fit)/2,
       tick.number=5, lty.grid=3, col.grid="grey", pch=16,
       cex.points=0.5, col.points="black", lty.lines=1, lwd.lines=2,
       col.lines=c("red","blue"), plot=TRUE, ...)

Arguments

model fitted scape model containing element CLc and/or CLs.
what what should be plotted: "c"[ommercial] or "s"[urvey] catch at length.
fit whether fitted values should be overlaid on observed data.
series vector of strings indicating which gears or surveys should be plotted (first by default).
sex string indicating which sex should be plotted (both by default).
years vector of numbers indicating which years should be plotted (all by default).
lengths vector of numbers indicating which lengths should be plotted (all by default).
axes whether axis values should be plotted.
same.limits whether panels should have same y-axis limits.
log whether values should be log-transformed.
base logarithm base.
eps.log small number to add before log-transforming to avoid log 0.
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.
lty.lines line type of main lines, possibly a vector where element 2 refers to males.
lwd.lines line width of main lines, possibly a vector where element 2 refers to males.
col.lines colour of main lines, possibly a vector where element 2 refers to males.
plot whether to draw plot.
... passed to xyplot, panel.xyplot, panel.superpose, and panel.superpose.2.

Value

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

Note

This function tries to draw the plot on a trellis device with a white background.

The Args function from the gdata package is recommended for reviewing the arguments, instead of args.

Author(s)

Arni Magnusson arnima@u.washington.edu.

See Also

Lattice, xyplot, panel.xyplot, panel.superpose, balloonplot.

scape-package gives an overview of the package.

Examples

plotCL(x.ling, fit=FALSE, strip=FALSE, series="1", sex="Female",
       xlab="Length (cm)", ylab="Year")

plotCL(x.oreo, xlab="Length (cm)", ylab="Proportion in catch")

plotCL(x.oreo, "s", layout=c(2,1), xlab="Length (cm)",
       ylab="Observed proportion in survey", cex.points=0.8,
       col.points=c("red","blue"), lty.lines=0)

plotCL(x.ling, fit=FALSE, series="2", xlab="Length (cm)",
       ylab="Observed proportion in trawl catch")

[Package scape version 1.0-8 Index]