Description Usage Arguments Examples
View source: R/geom_timeline_label.R
Plot labels for NOAA Significant Earthquake Data on a timeline.
1 2 3 4 5 6 7 8 9 10 11 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string, or the result of
a call to a position adjustment function. Cannot be jointy specified with
|
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
n_max |
Maximum number of labels to annotate timeline with |
... |
Other arguments passed on to |
1 2 3 4 5 6 7 8 9 10 11 12 | # Assumes the NOAA earthquake dataset has been obtained per method
# in `data-raw/earthquakes.R`.
ggplot2::ggplot(
eq_clean_data(earthquakes),
ggplot2::aes(x = date, y = country, colour = deathsTotal),
alpha = 1
) +
geom_timeline() +
geom_timeline_label(
ggplot2::aes(label = locationName, magnitude = eqMagnitude),
n_max = 5
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.