Description Usage Format Examples
This function creates the ggproto Stat object transform the data to effectively
plot the necessary grid grob for stat_timeline
1 |
An object of class StatTimeline
(inherits from Stat
, ggproto
) of length 3.
1 2 3 4 5 6 7 8 9 | data('clean_NOAA')
NOAA <- clean_NOAA
plot_NOAA <- NOAA[NOAA$COUNTRY=="USA" | NOAA$COUNTRY=="CANADA",]
xmin <- lubridate::ymd("2010-01-01")
xmax <- lubridate::ymd("2017-07-01")
plt <- ggplot2::ggplot(data = plot_NOAA, ggplot2::aes(x = DATE, y = COUNTRY)) +
geom_timeline(ggplot2::aes(size = EQ_PRIMARY), x_min = xmin, x_max = xmax) +
ggplot2::theme_minimal()
print(plt)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.