Description Usage Arguments Aesthetics Author(s) Examples
The timeline geom is used to create discrete point plots over a timeline. Time line of events ranging from xmin to xmax dates with a point for each event. Optional aesthetics include color, size, and alpha (for transparency). The xaesthetic is a date and an optional y aesthetic is a factor indicating some stratification in which case multiple time lines will be plotted.
1 2 3 |
... |
other arguments passed on to [layer()]. These are often aesthetics, used to set an aesthetic to a fixed value, like 'color = "red"' or 'size = 3'. They may also be parameters to the paired geom/stat. |
na.rm |
If 'FALSE', the default, missing values are removed with a warning. If 'TRUE', missing values are silently removed. |
geom_timeline understand the following aesthetics (required aesthetics is 'x'):
datetime of the event
the size of the circle drawn at the event
the colour of the circle drawn at the event
free groupiong parameter
József Varga
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# Use the built-in NOAA dataset filtered for two countries
eqdta <- eq_location_clean(eq_clean_data(earthquakes)) %>%
filter( date > ymd("20000101") & (COUNTRY=="USA" | COUNTRY=='CHINA' ) ) %>%
group_by(COUNTRY)
# Draw the geom
ggplot (data = eqdta) +
geom_timeline(
aes(
x = date,
y = COUNTRY,
size = FOCAL_DEPTH,
colour = EQ_PRIMARY
)
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.