Description Usage Arguments Details Value Author(s) See Also Examples
Creates a plot of catch and spawning biomass from the output of
SS_output
for the NOAA TSC report.
1 2 3 4 |
SSout |
The output from |
yrs |
The vector of years to plot |
ylimBar |
y-axis limits for catch barplot |
ylimDepl |
y-axis limits for depletion line |
colBar |
colors of the bars |
cexBarLabels |
character expansion for the labels underneath the bars (years) |
cex.axis |
character expansion for the axis labels |
space |
space between bars (see space argument of |
pchDepl |
character type for points on the depletion line |
colDepl |
color of the points on the depletion line |
lwdDepl |
width of the depletion line |
shiftDepl |
shift from beginning of the year for the points on the depletion line. Helps to guide the eye for exactly which year it corresponds to. |
pchSpace |
number of years between points on the depletion line. Higher numbers help tidy up the plot when plotting many years. |
ht |
Height of the plot in inches |
wd |
Width of the plot in inches |
labelLines |
line argument for |
makePDF |
filename for a pdf file. If NULL it does not make a pdf. Can specify a pdf filename or a png filename. Not both at the same time. |
makePNG |
filename for a png image. If NULL it does not make a png. Can specify a pdf filename or a png filename. Not both at the same time. |
MCMC |
If TRUE, will use mcmc results. It needs a list element called 'mcmc' on SSout. |
It creates a plot on the current graphics device, in a pdf file, or as a png image of the figure used in the TSC report produced by the NWFSC.
It expects the SS results read in by SS_output
. If MCMC results are to be plotted, a 'mcmc' list element should be added using the
SSgetMCMC
function. See the examples below.
Returns a data frame with the years, spawning biomass, depletion, and total dead catch.
Allan Hicks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ## Not run:
######################################
#DO NOT RUN
library(r4ss)
update_r4ss_files()
# ** CHANGE TO THE BASE DIRECTORY
directory <- "C:\NOAA2011\Dover\Models\base_20110701"
base <- SS_output(dir=directory,covar=F,verbose=F)
#show the plot in R
TSCplot(base)
TSCplot(base,yrs=2000:2011,pchSpace = 1)
#Create the plot as a PNG file
TSCplot(base,makePNG="C:\NOAA2012\Assessments\TSCdover.png")
#Create the plot as a PDF file
TSCplot(base,makePDF="C:\NOAA2012\Assessment\TSCdover.pdf")
# ** Hake model with MCMC results
SSdir <- "C:/NOAA2012/Hake/Models"
base <- SS_output(dir=paste(SSdir,"81_base_MCMC",sep="/"),covar=F)
tmp <- SSgetMCMC(dir=paste(SSdir,"81_base_MCMC",sep="/"),writecsv=F)
base$mcmc <- data.frame(tmp$model1)
TSCplot(base,ylimDepl = c(0,1.25),pchSpace=1,MCMC=T)
###############################################
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.