plot_prod: Plot single model fit with multiple functional groups for...

Description Usage Arguments

View source: R/plot_bins_and_fits.R

Description

Plot single model fit with multiple functional groups for individual production

Usage

 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
)

Arguments

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: c('fg1','fg2','fg3','fg4','fg5','all')

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 fg_names.

color_names

Vector of line colors. Must be same length as fg_names.

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 "mean" for arithmetic mean.

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


qdread/forestscaling documentation built on Dec. 15, 2021, 12:42 a.m.