Description Usage Arguments Value Examples
This function create an ad hoc geometry to visualize a label for the
timeline of earthquakes. The geometry is represented by a vertical line and
a text label.
The max number of labels is controlled by the parameter n_max
.
1 2 3 4 |
n_max |
MAx number of labels to display per each row. Default = 5. |
a ggplot2 geometry
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data %>%
dplyr::filter(COUNTRY == "USA" & YEAR > 2000) %>%
ggplot() +
geom_timeline(aes(x = DATE, y = COUNTRY, size = EQ_PRIMARY, color = DEATHS)) +
geom_timeline_label(aes(x = DATE, y = COUNTRY, label = LOCATION_NAME,
size = EQ_PRIMARY), n_max = 5) +
labs(size = "Richter Scale value:", color = "# of Deaths:")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.