View source: R/plot-param-density.R
plot_param_density | R Documentation |
Create a plot showing the density of the posterior for the catch forecast for a given year
plot_param_density(
model,
param_nm,
prob_vec = probs,
scale = 1000,
x_lab = "",
y_lab = "Density",
x_lim = c(0, 3000),
y_lim = c(0, 1e-04),
expand_vec = c(0, 0),
x_breaks = seq(x_lim[1], x_lim[2], by = (x_lim[2] - x_lim[1])/6),
fill_color = ts_single_model_ribbon_fill,
fill_alpha_tail = 0.3,
fill_alpha_main = 0.7,
show_y_labels = TRUE,
show_med_label = TRUE,
med_label_units = "kt",
med_label_digits = 3,
arrow_obj = arrow(length = unit(0.5, "cm"), angle = 20, type = "closed"),
label_x_offset = 500,
label_y_offset = 1e-04,
...
)
model |
The model output from Stock Synthesis as loaded by
|
param_nm |
A parameter name present in |
prob_vec |
A vector of probabilities to use in the |
scale |
A value to divide the parameter values by |
x_lab |
The x-axis label |
y_lab |
The y-axis label. Only shown if |
x_lim |
A vector of two values. The x-axis minimum and maximum values |
expand_vec |
A vector to pass to the |
fill_color |
The color used to fill under the density curve |
fill_alpha_tail |
The transparency used for the color of the tails |
fill_alpha_main |
The transparency used for the color of the main part of the curve (-1SD - 1SD) |
show_y_labels |
Logical. If |
show_med_label |
Logical. If |
med_label_units |
Units (as text) to place in the label showing the
median. Only used if |
label_x_offset |
An x-axis offset to move the median label to,
Positive means move right. Only used if |
label_y_offset |
A y-axis offset to move the median label to,
Positive means move up. Only used if |
... |
Arguments to pass to |
show_med_digits |
Number of decimal places to show in the median label.
Only used if |
A ggplot2::ggplot()
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.