View source: R/plot_bins_and_fits.R
Plot single model fit with multiple functional groups for individual production
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | plot_prod(
year_to_plot = 1995,
fg_names = c("fg1", "fg2", "fg3", "fg4", "fg5", "all"),
model_fit = 1,
x_limits,
x_breaks = c(1, 3, 10, 30, 100, 300),
y_limits,
y_labels,
y_breaks,
fill_names = c("#BFE046", "#267038", "#27408b", "#87Cefa", "gray87"),
color_names = c("#BFE046", "#267038", "#27408b", "#87Cefa", "gray"),
x_name = "Diameter (cm)",
y_name = expression(paste("Growth (kg y"^-1, ")")),
average = "mean",
plot_errorbar = FALSE,
error_min = "ci_min",
error_max = "ci_max",
error_bar_width = 0.1,
error_bar_thickness = 0.5,
dodge_width = 0.03,
dodge_errorbar = TRUE,
geom_size = 4,
obsdat = obs_indivprod,
preddat = fitted_indivprod,
plot_abline = TRUE,
abline_slope = 2,
abline_intercept = -1.6
)
|
year_to_plot |
Default 1995, currently no other years have model fits. |
fg_names |
Vector of functional group names to plot. Defaults to plot all five plus the total: |
model_fit |
Which model to plot. Defaults to 1 (one-segment power law) but 2 was also fit and can be plotted. |
x_limits |
2-length vector of minimum and maximum x-value to plot. |
x_breaks |
Tick values to display on x-axis. |
y_limits |
2-length vector of minimum and maximum y-value to plot. |
y_labels |
Labels to show at the tick values on the y-axis (in case you want different notation). |
y_breaks |
Tick values to display on y-axis. |
fill_names |
Vector of fill colors. Must be same length as |
color_names |
Vector of line colors. Must be same length as |
x_name |
Title of x-axis. |
y_name |
Title of y-axis. |
average |
Which type of average to plot for the binned points. Default is |
geom_size |
Size of points to plot. Default is 4. |
obsdat |
Name of R object with observed production values. |
preddat |
Name of R object with fitted production values. |
plot_abline |
Whether to include reference line, default TRUE |
abline_slope |
Slope of the optional reference line, default 2 |
abline_intercept |
Intercept of the optional reference line, default -1.6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.