Description Usage Arguments Value Examples
geom_timeline_label function
1 2 3 |
mapping |
The aesthetics that the geom accepts |
data |
The input dataset |
stat |
The statistical transformation function that must be used |
position |
The position of the transformation data |
na.rm |
A logical scalar. Should missing values (including NaN) be removed? |
show.legend |
Display the legend or not (TRUE or FALSE) |
inherit.aes |
Inherit aesthetics from main ggplot call |
n_max |
The maximum number of labels to display |
This function returns the labels that are plotted on the timeline
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
readr::read_delim("earthquakes.tsv.gz",delim = "\t") %>%
eq_clean_data() %>%
dplyr::filter(COUNTRY == "USA" & lubridate::year(DATE) >= 2000) %>%
ggplot() +
geom_timeline(aes(x = DATE, y = COUNTRY,size = EQ_PRIMARY, colour = DEATHS)) +
geom_timeline_label(aes(x = DATE, y = COUNTRY, label = LOCATION_NAME,
size = EQ_PRIMARY), n_max = 5) +
ggtitle("Earthquake Timeline") +
theme_timeline() +
labs(size = "Richter Scale value:", colour = "# of Deaths:")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.