plot.nfd: Plot nfd objects

View source: R/plot.nfd.R

plot.nfdR Documentation

Plot nfd objects

Description

Plot nfd objects (including crss_nf and crssi objects) for a single site. Plotting these objects are meant to give a cursory look at the underlying data. For more complex statistics see nfd_stats().

Usage

## S3 method for class 'nfd'
plot(
  x,
  trace = -1,
  site = 1,
  flow_space = "both",
  time_step = "both",
  base_units = NULL,
  which = "box",
  show = TRUE,
  ...
)

Arguments

x

An object inheriting from nfd.

trace

The trace(s) to use as a numeric vector. If -1, then all traces are used, otherwise the traces specified in the vector are used.

site

The site to plot as a scalar numeric or character. Should be a site number, or a site name.

flow_space

The flow space to plot. "both", "intervening", or "total".

time_step

The time step of data to plot. "both", "annual", or "monthly".

base_units

The units of the data. Used for the y-axis label.

which

The type of plot to create. Can be multiple plot types, but must be "box", "cloud", "spaghetti", or some combination of these three types. Can also specify numerically as 1, 2, and 3, respectively. See the Annual plots and Monthly plots sections for details.

show

Boolean. Should the plots be shown if in interactive mode. If TRUE, the user can enter through all returned plots.

...

Other parameters not used by this method.

Value

nfdplot object. See print.nfdplot(), save_nfdplot().

Annual plots

Annual plots include boxplots, cloud plots, and spaghetti plots; each plot shows the annual values across multiple traces through time. Box and cloud plots use the 5th, 25th, 75th, and 95th percentiles as box and whiskers (in the box plot) and as the different shaded regions (in the cloud plot). The spaghetti plots show every single trace as a line plot.

Monthly plots

Monthly plots only include boxplots by month. These boxplots aggregate data for all months and all traces. The months are ordered from January - December if the underlying object has a calendar year (cy) year attribute, and October - September if it has a water year (wy) year attribute.


BoulderCodeHub/CRSSIO documentation built on July 2, 2023, 5:15 p.m.