plot_frequency: Plot distribution of inputed lake levels

Description Usage Arguments Value

View source: R/plot_frequency.R

Description

Given a data frame with lake levels for a single lake or multiple lakes, plot the distribution (density) of estimated lake levels. If data frame has multiple lakes, will display as facet plots. Options to add xintercepts.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plot_frequency(
  df,
  convert_to_ft = TRUE,
  xintercept = NULL,
  probs = NULL,
  title = "",
  text_size = 12,
  vline_color = "#c00000",
  hist_color = "grey80",
  density_color = "#c00000",
  line_size = 1,
  pfl_is_long = TRUE,
  labels = TRUE,
  lakes = c("Pleasant", "Long", "Plainfield")
)

Arguments

df

a data frame with columns for "lake", "date", "level_obs", and "level_pred".

convert_to_ft

defaults to TRUE to convert lake levels from meters to ft

xintercept

either a single value (if only one lake) or a data frame with two columns: "xintercept" with the values, and "lake" with the name of each lake in df. Default to NULL to not add a line.

probs

exceedance probabilities (e.g., 10 for 10%) to identify with a horizontal line

title

string to use for title of plot, defaults to "".

text_size

size of text, defaults to 12

vline_color

color of vertical line, defaults to a red ("#c00000")

hist_color

color of histogram bins, defaults to "grey80"

density_color

color of density curve with alpha = 0.2, defaults to a red ("#c00000")

line_size

line size, default to 1

pfl_is_long

defaults to TRUE to force the y-limits of plainfield lake to the same as long lake.

labels

logical defaults to TRUE to label exceedance probabilities (if displayed)

lakes

vector of lakes to include in plot. Defaults to c("Pleasant", "Long", "Plainfield")

Value

plot_obj, a plot with the distribution(s) of estimated lake elevation


WDNR-Water-Use/CSLSlevels documentation built on Nov. 21, 2020, 9:13 a.m.