plot_boot_phase: Phase plots for bootstrapped data

View source: R/plot_boot_phase.R

plot_boot_phaseR Documentation

Phase plots for bootstrapped data

Description

Bivariate scatter plots, specially formatted for making phase plots for stock and fishery status results.

Usage

plot_boot_phase(
  x,
  y,
  xref = NULL,
  yref = NULL,
  col_point = rgb(0, 0, 0, 0.2),
  col_quant = "green4",
  col_ref = "black",
  col_text = "blue",
  probs = c(0.05, 0.95),
  text_x_adj = c(0, 0, 0, 0),
  text_y_adj = c(0, 0, 0, 0),
  ...
)

Arguments

x

x values from bootstrapping. numeric vector

y

y values from bootstrapping. numeric vector

xref

x reference value (e.g. base run value).

yref

y reference value (e.g. base run value).

col_point

color for (x,y) points

col_quant

color for quantile lines

col_ref

color for (xref,yref) points

col_text

color for percentages plotted in each quadrant

probs

quantile probabilities to compute length of error bars.

text_x_adj

text (percentages in each quadrant) adjustment to x

text_y_adj

text (percentages in each quadrant) adjustment to y

...

other parameters to pass to plot

Author(s)

Nikolai Klibansky

Examples

nsim <- 1000
x <- rnorm(n=nsim,mean=1.1,sd=.2)
y <- 1*(1/x)+rnorm(n=nsim,mean=0.1,sd=.1)
par(mfrow=c(2,2))
plot_boot_phase(x,y)
plot_boot_phase(x,y,xref=1.2,yref=1.1)
plot_boot_phase(x,y,xref=1.2,yref=1.1,xlab="F/Fmsy",ylab="SSB/SSBmsy")
plot_boot_phase(x,y,xref=1.2,yref=1.1,xlab="F/Fmsy",ylab="SSB/SSBmsy",col_point=rainbow(nsim,alpha=0.3))

nikolaifish/bamExtras documentation built on April 17, 2025, 9:44 p.m.