Description Usage Arguments Details Examples
View source: R/geom_timeline_label.R
This geom plots timeline labels of earthquakes. It assumes that
geom_timeline
was used to create the timelines
1 2 3 4 |
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. |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
xmin |
A Posixct date to filter data with date >= xmin |
xmax |
A Posixct date to filter data with date < xmax |
n_max |
An integer. If used, it only plots the labels for the
|
angle |
Anglo to represent label text, default 45<c2><ba> |
... |
other arguments passed on to |
The function plots timeline labels of earthquakes based on cleaned
NOAA data. It should be used with combination with geom_timeline
. The
required aesthetics for this geom is label
that should contain
string for labeling each data point.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data %>% eq_clean_data() %>%
dplyr::filter(COUNTRY %in% c("GREECE", "ITALY")) %>%
ggplot(aes(x = DATE, y = COUNTRY, color = TOTAL_DEATHS, size = EQ_PRIMARY,
magnitude = EQ_PRIMARY, label = LOCATION_NAME)) +
geom_timeline_label(xmin = "2000-01-01", xmax = "2010-01-01", n_max = 2, angle = 60) +
geom_timeline(xmin = "2000-01-01", xmax = "2010-01-01") +
theme_timeline()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.