plot.nfd_stats: Plot nfd_stats and nfd_pdf Objects

plot.nfd_statsR Documentation

Plot nfd_stats and nfd_pdf Objects

Description

plot.nfd_stats() plots the resulting "base" statistics after calling nfd_stats(). Statistics are plotted as boxplots across traces. plot.nfd_pdf() plots the resulting PDF after calling nfd_pdf(). The range of PDFs for every trace are shown as the statistics around the probability of any given flow occurring. For monthly data, one PDF is created for each month. Historical or some other reference trace can be shown on both plots using ref.

Usage

## S3 method for class 'nfd_stats'
plot(x, ref = NULL, base_units = NULL, show = TRUE, ...)

## S3 method for class 'nfd_pdf'
plot(x, ref = NULL, base_units = NULL, show = TRUE, ...)

Arguments

x

An object inheriting from nfd_stats or nfd_pdf.

ref

An object inheriting from nfd_stats. Optional. Stats in this object are shown as points/lines instead of boxplots.

base_units

Optional. Used as y-axis label.

show

Boolean. If TRUE and in interactive mode, will show the plot in the plot window.

...

Additional options passed to ggplot2::geom_point() and ggplot2::geom_line(). size, shape, and color can be overridden for points, and linewidth, linetype, and color can be overridden for lines.

Details

For monthly plots, plot.nfd_pdf() will create an individual plot for all months that exist in the nfd_pdf data frame.

Value

nfdplot object.

See Also

nfd_stats(), save_nfdplot()

nfd_pdf()


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