geom_timeline_label: earthquake package

Description Usage Arguments Format Details Examples

View source: R/geom_timeline_label.R

Description

5.Label the timeline plot with geom_timeline_label function

Usage

 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

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 GeomTimelineLabel (inherits from Geom, ggproto, gg) of length 5.

Details

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.

Examples

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)

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