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

Description Usage Arguments

View source: R/plot_bins_and_fits.R

Description

Specify both density and production type

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
plot_totalprod(
  year_to_plot = 1995,
  fg_names = c("fg1", "fg2", "fg3", "fg4", "fg5", "all"),
  model_fit_density = 1,
  model_fit_production = 1,
  x_limits,
  x_breaks = c(1, 3, 10, 30, 100, 300),
  y_limits = c(0.03, 100),
  y_breaks = c(0.01, 0.1, 1, 10, 100, 1000),
  y_labels,
  fill_names = c("black", "#BFE046", "#267038", "#27408b", "#87Cefa", "gray87"),
  color_names = c("black", "#BFE046", "#267038", "#27408b", "#87Cefa", "gray"),
  x_name = "Diameter (cm)",
  y_name = expression(paste("Production (kg ha"^-1, " cm"^-1, " y"^-1, ")")),
  geom_size = 4,
  obsdat = obs_totalprod,
  preddat = fitted_totalprod,
  plot_abline = TRUE,
  abline_slope = 0,
  abline_intercept = 2
)

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_density

Which density model to plot. Defaults to 1 (one-segment power law) but 2 was also fit and can be plotted.

model_fit_production

Which production 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_breaks

Tick values to display on y-axis.

y_labels

Labels to show at the tick values on the y-axis (in case you want different notation).

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.

geom_size

Size of points to plot. Default is 4.

plot_abline

Whether to include reference line, default TRUE

abline_slope

Slope of the optional reference line, default 0

abline_intercept

Intercept of the optional reference line, default 2

obs_dens

Name of R object with observed density values.

pred_dens

Name of R object with fitted density values.


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