plot_metab | R Documentation |
Plot gross production, total respiration, and net ecosystem metabolism for a swmpr object.
plot_metab(swmpr_in, ...)
## S3 method for class 'swmpr'
plot_metab(
swmpr_in,
by = "months",
alpha = 0.05,
width = 10,
pretty = TRUE,
...
)
swmpr_in |
input swmpr object |
... |
arguments passed to or from other methods |
by |
chr string describing aggregation period, passed to |
alpha |
numeric indicating alpha level for confidence intervals in aggregated data. Use |
width |
numeric indicating width of top and bottom segments on error bars |
pretty |
logical indicating use of predefined plot aesthetics |
A plot will only be returned if the metabolism
attribute for the swmpr
object is not NULL
. Daily metabolism estimates are also aggregated into weekly averages. Accepted aggregation periods are 'years'
, 'quarters'
, 'months'
, 'weeks'
, and 'days'
(if no aggregation is preferred).
By default, pretty = TRUE
will return a ggplot
object with predefined aesthetics. Setting pretty = FALSE
will return the plot with minimal modifications to the ggplot
object. Use the latter approach for easier customization of the plot.
A ggplot
object which can be further modified.
aggremetab
, ecometab
## Not run:
## import water quality and weather data
data(apadbwq)
data(apaebmet)
## qaqc, combine
wq <- qaqc(apadbwq)
met <- qaqc(apaebmet)
dat <- comb(wq, met)
## estimate metabolism
res <- ecometab(dat)
## plot
plot_metab(res)
## change alpha, aggregation period, widths
plot_metab(res, by = 'quarters', alpha = 0.1, widths = 0)
## plot daily raw, no aesthetics
plot_metab(res, by = 'days', pretty = FALSE)
## note the difference if aggregating with a moving window average
plot_metab(res, by = 30)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.