Learn R Programming

scape (version 1.0-4)

plotLA: Plot Length at Age

Description

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

Usage

plotLA(model, together=FALSE, sex=NULL, axes=TRUE, same.limits=TRUE,
       between=list(x=axes,y=axes), ylim=NULL, bands=1, main="",
       xlab="", ylab="", cex.main=1.2, cex.lab=1, cex.strip=0.8,
       cex.axis=0.8, las=1, tck=0, tick.number=5, lty.grid=3,
       col.grid="grey", pch=16, cex.points=0.5, col.points="black",
       lty.lines=1, lwd.lines=4, col.lines=c("red","blue"),
       lty.bands=2*(!together), lwd.bands=1, col.bands="black",
       plot.it=TRUE, ...)

Arguments

model
fitted scape model containing element LA.
together
whether both sexes should be plotted in one panel.
sex
string indicating which sex should be plotted (both by default).
axes
whether axis values should be plotted.
same.limits
whether panels should have same y-axis limits.
between
list with x and y indicating panel spacing.
ylim
vector with lower and upper y-axis limits.
bands
extent of error bands relative to standard error.
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, possibly a vector where element 2 refers to males.
cex.points
size of points, possibly a vector where element 2 refers to males.
col.points
colour of points, possibly a vector where element 2 refers to males.
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.
lty.bands
line type of error bands.
lwd.bands
line width of error bands.
col.bands
colour of error bands, possibly a vector where element 2 refers to males.
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

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
plotLA(x.oreo, xlab="Age", ylab="Length (cm)")

mykey <- list(text=list(lab=c("Female","Male")), space="right",
              lines=list(lwd=4,col=c("red","blue")))
plotLA(x.oreo, together=TRUE, xlab="Age", ylab="Length (cm)", pch=NA,
       key=mykey)

mykey <- list(text=list(lab=c("Female","Male")), space="right",
              points=list(pch=16,cex=0.5,col=c("red","blue")))
plotLA(x.oreo, together=TRUE, xlab="Age", ylab="Length (cm)",
       col.points=c("red","blue"), lty.lines=0, key=mykey)

Run the code above in your browser using DataLab