Description Usage Arguments Format Details Examples
View source: R/geom_timeline_label.R
5.Label the timeline plot with geom_timeline_label
function
1 2 3 4 5 6 7 8 9 10 11 12 | geom_timeline_label(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = F,
show.legend = NA,
inherit.aes = T,
...
)
GeomTimelineLabel
|
mapping |
Set of asthetic mappings created by [aes()] |
data |
data frame |
stat |
stat function=identity |
position |
position=identity |
na.rm |
remove NA=F |
show.legend |
show legend=NA |
inherit.aes |
inherit ase=TRUE |
... |
Other arguments passed on to [layer()]. |
An object of class GeomTimelineLabel
(inherits from Geom
, ggproto
, gg
) of length 5.
This function labels the timeline plot
asthetics: x is required, specifies date variable to plot on x axis; label is required, specifies label variable to label on y axis; n_max is optional, specifies the number of earthequakes of greatest magnitude by countries to label.
1 2 3 4 5 | ## Not run:
p<-ggplot(data2,aes(x=DATE,y=COUNTRY,size=EQ_PRIMARY,fill=TOTAL_DEATHS))+geom_timeline()
p+geom_timeline_label(aes(label=LOCATION_NAME,n_max=4))+mytheme
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.