Description Usage Arguments Value Author(s) See Also Examples
Takes a time series of catch and plots the series with colour bars overlaid that indicate the assessed stock status.
1 2 3 4 5 6 | plot_status_ts(catch,
year,
status,
xlab = "Year",
ylab = "Catch",
...)
|
catch |
The catch series. |
year |
The associated years to plot. |
status |
The status. Should be a factor with levels of 1:6 representing: "Undeveloped", "Developing", "Rebuilding", "Fully exploited", "Overexploited", and "Collapsed", in that order. |
xlab |
The x-axis label. |
ylab |
The y-axis label. |
... |
Other parameter values to pass to plot.default(). |
A plot of the time series with coloured status bars overlaid.
Sean Anderson
get_froese_etal_2012_status
, plot_status_stacked
1 2 3 4 5 6 | set.seed(3)
x <- c(1:20, 20:1, rep(2, 5), 2:20, 19:1, rep(2, 10), 2:8)*10 + rnorm(100, 6, 8)
years <- 1901:2000
dat <- data.frame(year = years, catch = x)
x <- transform(dat, status = get_froese_etal_2012_status(catch)$status)
with(x, plot_status_ts(catch, year, status))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.