View source: R/graph_functions.R
lolli_plot | R Documentation |
Visualise a timeline of several possible event metrics as 'lollipop' graphs.
lolli_plot(data, xaxis = date_peak, metric = intensity_max, event_count = 3)
data |
Output from the |
xaxis |
The name of a column from the |
metric |
The name of a column from the |
event_count |
The number of top events to highlight, as determined by the
column given to |
The function will return a graph of the intensity of the selected
metric
along the y-axis and the chosen xaxis
value.
The number of top events as per event_count
will be highlighted
in a brighter colour. This function differs in use from geom_lolli
in that it creates a stand-alone figure. The benefit of this being
that one does not need any prior knowledge of ggplot2
to create the figure.
Albertus J. Smit and Robert W. Schlegel
ts <- ts2clm(sst_WA, climatologyPeriod = c("1983-01-01", "2012-12-31"))
res <- detect_event(ts)
library(ggplot2)
# The default output
lolli_plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.