plot_IPHC_ser_E_and_F: Plotting functions for gfiphc. The E and F ones were actually...

View source: R/plot-iphc.R

plot_IPHC_ser_E_and_FR Documentation

Plotting functions for gfiphc. The E and F ones were actually done first (had no time to do Series A-D ones for first gfsynopsis, which is why Figures G.1 and G.2 were copied from an earlier assessment). Could have made one global function for all options, but would have lots of if statements, so just use the E_and_F one to create new one. Though for A-D there are multiple comparisons we might wish to make, so making that function a bit more general . Single plotting function for Series E, F or EF

Description

Plotting function for objects of class ⁠IPHC_ser_E_and F⁠ and also IPHC_ser_EF, which are, respectively,

  • list containing tibbles for ser_E and ser_F

  • list containing tibble for ser_longest (and more)

Usage

plot_IPHC_ser_E_and_F(
  ser_E_and_F,
  series_longest = NULL,
  plot_type = "E",
  x_lim = c(1995, 2022),
  y_lim = NULL,
  shift = 0.15,
  tck_length = -0.02,
  ser_E_col = "blue",
  ser_F_col = "red",
  legend_text = NULL,
  x_lab = "Year",
  y_lab = "Catch rate index (numbers per effective skate)",
  gap_ci = 0.5,
  ...
)

Arguments

ser_E_and_F

list containing tibbles for ser_E and ser_F of class IPHC_ser_E_and_F, an output from calc_iphc_ser_E_and_F

series_longest

list of outputs from calc_iphc_ser_EF(ser_E_and_F), including tibble ser_longest plus t-test results and geometric means of each series.

plot_type

one of

  • E to plot just Series E

  • F to plot just Series F

  • E_F_scaled to plot Series E and F each scaled by their geometric mean of the overlapping years (no scaling if no overlapping years)

  • EF to plot Series EF (with E rescaled in red), empty plot if longest series is just E or F

x_lim

x range

y_lim

y range

shift

if plotting two then shift Series E to left and F to right by shift amount

tck_length

small tickmark lengths

ser_E_col

colour for Series E

ser_F_col

colour for Series F

legend_text

text to override default if desired

x_lab

x label to override default if desired

y_lab

y label to override default if desired

gap_ci

gap (units of 'height of letter O') between cirlce and whiskers for confidence intervals

...

further arguments to gplots::plotCI

Details

Since an object with class IPHC_ser_EF can only be calculated from an object of class IPHC_ser_E_and_F, to plot the former requires the latter to be input also, and this function plots your choice of plot. Inputting both means that the y-axes will be standardised across the types of plot (where possible).

Value

Single plot for Series E, F, or EF

Author(s)

Andrew Edwards

Examples

## Not run: 
# See vignettes.


## End(Not run)

pbs-assess/gfiphc documentation built on July 4, 2023, 1:13 p.m.