Description Usage Arguments Value Aesthetics See Also Examples
View source: R/earthquake_geoms.R
This geom will create a timeline where every event will be plotted as a point on the timeline.
1 2 3 |
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If NULL, the default, the data is inherited from the plot data as specified in the call to A data.frame, or other object, will override the plot data. All objects will be fortified to produce a data frame. See A function will be called with a single argument, the plot data. The return value must be 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 |
... |
other arguments passed on to |
Returns a layer that can be added to a ggplot object.
geom_timeline
understands the following aesthetics :
x, required, should be a date
y, a timeline is created for each value of y
shape
colour
size
alpha
stroke
fill
geom_point (ggplot2)
1 2 3 4 5 6 7 8 | ## Not run:
data <- get_eq_data() %>% eq_clean_data() %>% eq_location_clean()
ggplot() + geom_timeline(data = data, aes(x = date))
ggplot() + geom_timeline(data = data, aes(x = date, y = COUNTRY))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.