Learn R Programming

r4ss (version 1.20)

SSplotSelex: Plot selectivity

Description

Plot selectivity, including retention and other quantities, with additional plots for time-varying selectivity.

Usage

SSplotSelex(replist, infotable = NULL, fleets = "all",
fleetnames = "default", sizefactors = c("Lsel"),
agefactors = c("Asel"), years = "endyr", season = 1,
sexes="all", selexlines = 1:5, subplot = 1:25,
skipAgeSelex10 = TRUE,
plot = TRUE, print = FALSE, add = FALSE,
labels=c("Length (cm)",
  "Age (yr)",     
  "Year",         
  "Selectivity",  
  "Retention",    
  "Discard mortality"),
col1 = "red", col2 = "blue",
lwd = 2, fleetcols = "default", fleetpch = "default",
fleetlty = "default", spacepoints = 5,
staggerpoints = 1, legendloc = "bottomright", 
pwidth = 7, pheight = 7, punits = "in", res = 300, ptsize = 12,
cex.main = 1, plotdir = "default", verbose = TRUE)

Arguments

replist
List created by SS_output
fleets
Optional vector to subset fleets for which to make plots
infotable
Optional table of information controlling appearance of plot and legend. Is produced as output and can be modified and entered as input.
fleetnames
Optional replacement for fleenames used in data file
sizefactors
Which elements of the factors column of SIZE_SELEX should be included in plot of selectivity across multiple fleets?
agefactors
Which elements of the factors column of AGE_SELEX should be included in plot of selectivity across multiple fleets?
years
Which years for selectivity are shown in multi-line plot (default = last year of model).
season
Which season (if seasonal model) for selectivity shown in multi-line plot (default = 1).
sexes
Optional vector to subset genders for which to make plots (1=females, 2=males)
selexlines
Vector to select which lines get plotted. values are 1. Selectivity, 2. Retention, 3. Discard mortality, 4. Keep = Sel*Ret, 5. Dead = Sel*(Ret+(1-Ret)*Mort).
subplot
Vector controlling which subplots to create
skipAgeSelex10
Exclude plots for age selectivity type 10 (selectivity = 1.0 for all ages beginning at age 1)?
lwd
Line widths for plots
fleetcols
Optional vector of colors for each fleet (in multi-fleet plots)
fleetpch
Optional vector of plot characters for each fleet (in multi-fleet plots)
fleetlty
Optional vector of line types for each fleet (in multi-fleet plots)
spacepoints
number of years between points shown on top of lines (for long timeseries, points every year get mashed together)
staggerpoints
number of years to stagger the first point (if spacepoints > 1) for each line (so that adjacent lines have points in different years)
legendloc
location of legend. See ?legend for more info.
plot
Plot to active plot device?
print
Print to PNG files?
add
Add to existing plot (not yet implemented)
labels
vector of labels for plots (titles and axis labels)
col1
color for female growth curve
col2
color for male growth curve
pwidth
width of plot written to PNG file
pheight
height of plot written to PNG file
punits
units for PNG file
res
resolution for PNG file
ptsize
ptsize for PNG file
cex.main
character expansion for plot titles
plotdir
directory where PNG files will be written. by default it will be the directory where the model was run.
verbose
report progress to R GUI?

See Also

SS_plots, SS_output