plot.epinowcast | R Documentation |
plot
method for class "epinowcast".
## S3 method for class 'epinowcast'
plot(
x,
latest_obs = NULL,
type = c("nowcast", "posterior_prediction"),
log = FALSE,
...
)
x |
A |
latest_obs |
A |
type |
Character string indicating the plot required; enforced by
|
log |
Logical, defaults to |
... |
Additional arguments to the plot function specified by |
ggplot2
object
Other epinowcast:
epinowcast()
,
summary.epinowcast()
Plotting functions
enw_plot_nowcast_quantiles()
,
enw_plot_obs()
,
enw_plot_pp_quantiles()
,
enw_plot_quantiles()
,
enw_plot_theme()
nowcast <- enw_example("nowcast")
latest_obs <- enw_example("obs")
# Plot nowcast
plot(nowcast, latest_obs = latest_obs, type = "nowcast")
# Plot posterior predictions by reference date
plot(nowcast, type = "posterior_prediction") +
ggplot2::facet_wrap(ggplot2::vars(reference_date), scales = "free")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.