Description Usage Arguments Details Examples
View source: R/geom_timeline_label.R
This function generates annotation to accompany 'geom_timeline' plot objects. The name of the earthquake location is shown above the timeline point and a line connection the name with the point is drawn.
1 2 3 |
mapping |
Set of aesthetic mappings created by <e2><80><98>aes<e2><80><99>. Can be inherited from upper levels of the plot. |
data |
The data to be displayed in this layer. Can be NULL, data.frame or function |
stat |
The statistical transformation to use on the data for this layer |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
show.legend |
logical. Should this layer be included in the legends? |
na.rm |
If <e2><80><98>FALSE<e2><80><99>, the default, missing values are removed with a warning. If <e2><80><98>TRUE<e2><80><99>, missing values are silently removed. |
inherit.aes |
If <e2><80><98>FALSE<e2><80><99>, overrides the default aesthetics, rather than combining with them. |
... |
other arguments passed on to <e2><80><98>layer<e2><80><99>. |
aes parameters act similar to 'geom_label' aes
x: a Date object
y: single integer or a factor. (points will be grouped by y) example: COUNTRY
n_max: integer max number of labels sorted by size
size: numeric data field to base limiting of number of labels
label: character text to be diplayed over points
1 2 3 4 5 6 7 8 9 | ## Not run:
ggplot(quakesFiltered,aes(x = DATE, y = COUNTRY,
xmin = as.Date("2000-1-1","%Y-%m-%d"),
xmax = as.Date("2015-12-31","%Y-%m-%d"),
)) +
geom_timeline(aes(size = EQ_PRIMARY)) +
geom_timeline_label(aes(size = EQ_PRIMARY)) +
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.