Description Usage Arguments Format Details Examples
View source: R/geomtimelinelabel.R View source: R/geomtimelinelabel.R
geom_timeline_label
return a layer
representing earthquakes annotations to be added after
geom_timeline
, i.e. a vertical line to each data
point drown by geom_timeline
with a text annotation
(e.g. the location of the earthquake) attached to each earthquake
line.
1 2 3 4 5 6 7 8 9 10 11 12 13 | geom_timeline_label(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
show.legend = NA,
inherit.aes = TRUE,
n_max = NULL,
...,
na.rm = FALSE
)
GeomTimelineLabel
|
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. |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
n_max |
(int) number of earthquakes, where we take the n_max
largest (in |
... |
further arguments passed to the geom layer |
na.rm |
(lgl) remove missing data? |
An object of class GeomTimelineLabel
(inherits from Geom
, ggproto
, gg
) of length 6.
Aesthetics:
geom_timeline_label
understands the following aesthetics
(required in bold):
x: (Date) of earthquakes.
label: (chr) text annotation.
y: (factr) stratification. If present multiple time lines will be plotted for each level of the factor (e.g. country).
colour: of the points.
n_max: annotation to drowm.
size: of the points (if provided with n_max
too,
the n_max
largest eartquakes will be annotated).
1 2 3 4 5 | ## Not run:
ggplot(noaa,aes(x=DATE,y=COUNTRY,col=TOTAL_DEATHS,size=EQ_PRIMARY))+
geom_timeline_label()+theme_minimal()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.