Description Usage Arguments Format Details Examples
View source: R/geom_timeline.R
3.Timeline plot with geom_timeline
function
1 2 3 4 5 6 7 8 9 10 11 12 | geom_timeline(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = F,
show.legend = NA,
inherit.aes = T,
...
)
GeomTimeline
|
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 GeomTimeline
(inherits from Geom
, ggproto
, gg
) of length 5.
This new geom function is used to build a timeline plot of earthquakes.
asthetics: x is required, specifies date variable to plot on x axis; y is optional, specifies country variable to plot on y axis; size is optional, specifies size of the point (pch shape=21), i.e. magnitude of earthquake; fill is optional, specifies fill of the point, i.e. deaths.
1 2 3 4 | ## Not run:
p<-ggplot(data2,aes(x=DATE,y=COUNTRY,size=EQ_PRIMARY,fill=TOTAL_DEATHS))+geom_timeline()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.