geom_timeline: earthquake package

Description Usage Arguments Format Details Examples

View source: R/geom_timeline.R

Description

3.Timeline plot with geom_timeline function

Usage

 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

Arguments

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()].

Format

An object of class GeomTimeline (inherits from Geom, ggproto, gg) of length 5.

Details

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.

Examples

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)

hsm-stephanie/earthquake documentation built on April 30, 2020, 12:44 p.m.