Skip to contents

Plots retrospective pattern, including (optional) one-step ahead forecast and computes Mohn's Rho

Usage

SSplotRetro(
  summaryoutput,
  subplots = c("SSB", "F"),
  plot = TRUE,
  print = deprecated(),
  print_plot = FALSE,
  png = deprecated(),
  use_png = print_plot,
  pdf = deprecated(),
  use_pdf = FALSE,
  models = "all",
  endyrvec = "default",
  xlim = NULL,
  xmin = NULL,
  labels = NULL,
  ylim = NULL,
  forecast = TRUE,
  forecastrho = TRUE,
  showrho = TRUE,
  col = NULL,
  pch = NULL,
  lty = 1,
  lwd = 2,
  tickEndYr = TRUE,
  ylimAdj = 1.05,
  xaxs = "i",
  yaxs = "i",
  xylabs = TRUE,
  type = "o",
  uncertainty = TRUE,
  legend = TRUE,
  legendlabels = "default",
  legendloc = "topright",
  legendorder = "default",
  legendncol = 1,
  legendcex = 1,
  legendsp = 0.7,
  legendindex = NULL,
  pwidth = 6.5,
  pheight = 5,
  punits = "in",
  res = 300,
  ptsize = 10,
  cex.main = 1,
  plotdir = NULL,
  filenameprefix = "",
  par = list(mar = c(5, 4, 1, 1) + 0.1),
  verbose = TRUE,
  shadecol = grey(0.4, 0.6),
  new = TRUE,
  add = FALSE,
  mcmcVec = FALSE,
  shadecol1 = grey(0.5, 0.4),
  indexQlabel = TRUE,
  indexQdigits = 4,
  shadealpha = 0.3
)

Arguments

summaryoutput

List created by r4ss::SSsummarize()

subplots

Optional vector of subplots to be created:

  • "SSB" Spawning Stock Biomass

  • "F" Fishing Mortality

plot

DEPRECATED. By default, TRUE, Plots (and subplots) are drawn to the plot device. The option to explicitly disable this option (FALSE), is not implemented. This option flag will be defunct in a future version

print

DEPRECATED, please use print_plot.

print_plot

Flag to enable plot graphic device to print to PNG or PNG files.

png

DEPRECATED. Please use use_png.

use_png

Enables plots to be generated to PNG files. Defaults to print value

pdf

DEPRECATED. Please use use_pdf.

use_pdf

Enables plots to be generated to pdf file.

models

Optional subset of the models of summaryoutput (or a similar field with a different name): a list created by the function r4ss::SSsummarize. Either "all" or a vector of numbers indicating columns in summary tables.

endyrvec

Optional single year or vector of years representing the final year of values to show for each model. By default it is set to the ending year specified in each model.

xlim

Optional, years to use for x-axis. Default value NULL (or "default"), uses all years available.

xmin

optional minimum year shown in plot (default first yr)

labels

yaxis label for biomass (bony fish and sharks)

ylim

option to specify ylim range

forecast

Logical. If TRUE, one-step ahead forecasts are shown in plot

forecastrho

Logical. If TRUE, one-step ahead forecast rho value is denoted in plot

showrho

Logical flag to include Mohn's rho value. Defaults to TRUE

col

Optional vector of colors to be used for lines. Input NULL

pch

Optional vector of plot character values

lty

Optional vector of line types

lwd

Optional vector of line widths

tickEndYr

Logical flag: set TRUE or FALSE to switch to turn on/off extra axis mark at final year in timeseries plots.

ylimAdj

Multiplier for ylim parameter. Allows additional white space.

xaxs

Choice of xaxs parameter See ?par for more info.

yaxs

Choice of yaxs parameter. See ?par for more info.

xylabs

Logical flag: set TRUE or FALSE to include x- and y-axis labels to the plot. Defaults to TRUE

type

The type of plot to be drawn. For more details, see plot.

uncertainty

Logical flag to enable plots with uncertainty intervals. Either a single TRUE/FALSE value, or a vector of TRUE/FALSE values around SSB or F estimated timeseries, or a set of integers corresponding to the choice of models.

legend

Flag to enable legend to plot. TRUE by default.

legendlabels

Optional vector of labels to include in legend.

legendloc

Location of legend. Either a string like "topleft" or a vector of two numeric values representing the fraction of the maximum in the x and y dimensions, respectively. See help("legend") for more info on the string options.

legendorder

Optional vector of model numbers that can be used to have the legend display the model names in an order that is different than that which is represented in the summary input object.

legendncol

Number of columns for the legend.

legendcex

Allows to adjust legend cex

legendsp

Space between legend labels

legendindex

Allows to add legend for selected indices (plots)

pwidth

Default width of plot printed to plot in units of punits

pheight

Height of plot printed to plot in units of punits

punits

Measurement units for pwidth and pheight. Default is "in".

  • "px" (pixels)

  • "in" (inches)

  • "cm" (centimeters)

  • "mm" (millimeters)

res

Resolution for plots printed to files.

ptsize

Point size for plotted text in plots printed in files. See help("png") for more details

cex.main

Character expansion for plot titles.

plotdir

Directory where output plot file will be written. By default, it will be the directory where the model was run.

filenameprefix

Additional text to append to output plot file name. It will be separated from default name by an underscore.

par

A numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot,which is passed to par(). Entering NULL passes plot's default par() values (which depends on whether the main title is included or not)

verbose

Flag to print additional diagnostic messages to R console

shadecol

uncertainty shading of hcxval horizon

new

Deprecated. New plot windows are created by default (TRUE), and the option to disable this, via FALSE, is unused.

add

suppresses par() to create multiplot figs

mcmcVec

Logical vector of TRUE/FALSE values (or single value) indicating whether input values are from MCMC or to use normal distribution around MLE.

shadecol1

uncertainty shading of early years not affected by hindcast

indexQlabel

Logical. If TRUE, add catchability to legend in plot of index fits (currently not used)

indexQdigits

Number of significant digits for catchability in legend

shadealpha

set the transparency level (alpha) of the area of uncertainty. Defaults to 0.3 (currently not used)

Author

Henning Winker (JRC-EC) and Laurance Kell (Sea++)