plot_input: Plot water balance inputs for one or more lakes

Description Usage Arguments Value

View source: R/plot_input.R

Description

This function creates a plot object that showcases a given input over time for each lake of interest.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plot_input(
  df = NULL,
  ydata,
  ylabel,
  yscales = scales::scientific,
  geom_type = "col",
  title = "",
  facet_scales = "fixed",
  lakes = c("Pleasant", "Long", "Plainfield"),
  inputs_only = TRUE,
  date_intervals = "6 months",
  date_formats = "%b '%y",
  text_size = 10
)

Arguments

df

optional data frame passed to function containing columns "date", ydata, and "lake". Avoids need to run runall_csls_inputs or runall_csls_budget as part of this function.

ydata

colname of input data to display, e.g., "dV_m3" or "d18O_evap"

ylabel

string to display for y-axis title, e.g., "expression(Change~Lake~Volume~(m^3))" or "expression(delta^18*'O')"

yscales

type of scaling for y-axis, defaults to scales::scientific. Other options include scales::number for decimal format, scales::percent for percentages, etc.

geom_type

defaults to "col" to dispay as bar plot. Set to "point" to instead display as points, or "line" for lines.

title

string to display for title, defaults to "".

facet_scales

type of scaling of axis for facets, defaults to "fixed". Can also be "free_y", "free_x", or "free".

lakes

names of lakes to plot, defaults to include all: "c("Pleasant", "Long", "Plainfield")"

inputs_only

logical defaults to TRUE to trigger runall_csls_inputs. Set to FALSE to trigger runall_csls_budget instead (i.e., to obtain groundwater inflow or outflow values).

date_intervals

string with desired break interval for dates, defaults to "6 months".

date_formats

string with desired formatting for date labels, defaults to "%b '%y" for "Oct '19"-type formatting.

text_size

size of text, defaults to 10 pt.

Value

plot_obj - a plot object with aesthetics added


cvoter/isoH2Obudget documentation built on March 29, 2020, 11:07 a.m.