| plotCA {scape} | R Documentation |
Plot Catch at Age
Description
Plot scape model fit to catch-at-age data.
Usage
plotCA(model, what="c", fit=TRUE, swap=FALSE, series=NULL, sex=NULL,
years=NULL, ages=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.axis=0.8, cex.strip=0.8, col.strip="gray95",
strip=strip.custom(bg=col.strip), las=!fit, tck=c(1,fit)/2,
tick.number=5, lty.grid=3, col.grid="gray", 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 |
what |
what to plot: |
fit |
whether to overlay fitted values on observed data. |
swap |
whether to swap ages and years between axes or panels. |
series |
string indicating which gear or survey to plot (first by default). |
sex |
string indicating which sex to plot (both by default). |
years |
vector of numbers indicating which years to plot (all by default). |
ages |
vector of numbers indicating which ages to plot (all by default). |
axes |
whether to plot axis values. |
same.limits |
whether panels should have same y-axis limits. |
log |
whether to log-transform values. |
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.axis |
size of tick labels. |
cex.strip |
size of strip labels. |
col.strip |
color of strip labels. |
strip |
logical flag (whether to plot strip labels), or a
function passed to |
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 |
color of gridlines. |
pch |
symbol for points. |
cex.points |
size of points. |
col.points |
color 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 |
color of main lines, possibly a vector where element 2 refers to males. |
plot |
whether to draw plot. |
... |
passed to |
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
The Args function from the gdata package is recommended
for reviewing the arguments, instead of args.
See Also
xyplot, panel.xyplot,
and panel.superpose are the underlying drawing
functions.
plotCA, plotCL, plotIndex, and
plotLA plot model fit and data.
plotB, plotN, and plotSel
plot derived quantities.
scape-package gives an overview of the package.
Examples
plotCA(x.sbw, fit=FALSE, strip=FALSE, xlab="Age", ylab="Year",
tick.number=10)
plotCA(x.cod, xlab="Age", ylab="Proportion in catch", cex.strip=0.7,
cex.axis=0.7, col.lines="brown", layout=c(8,4))
plotCA(x.cod, xlab="Age", ylab="Proportion in catch", cex.strip=0.7,
cex.axis=0.7, col.lines="brown", layout=c(2,4), swap=TRUE,
ages=3:10, same.limits=FALSE)
plotCA(x.ling, "s", col.points=c("red","blue"), lty.lines=0, xlab="Age",
ylab="Observed proportion in survey", tck=0.5, cex.strip=0.7,
cex.axis=0.7)
plotCA(x.ling, "s", xlab="Age", ylab="Observed proportion in survey",
fit=FALSE, cex.strip=0.7, cex.axis=0.7, tck=0.5, layout=c(5,2))
plotCA(x.ling, "s", xlab="Age", ylab="Observed proportion in survey",
fit=FALSE, cex.strip=0.7, cex.axis=0.7, tck=0.5, layout=c(5,6),
swap=TRUE)