geom_timeline: Geom Timeline

Description Usage Arguments Value Examples

View source: R/geom_timeline.R

Description

Function plots timeline with circle point of earthquakes

Usage

1
2
3
geom_timeline(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", na.rm = FALSE, show.legend = NA,
  inherit.aes = TRUE, ...)

Arguments

mapping

mapping

data

data

stat

stat

position

position

na.rm

na.rm

show.legend

show.legend

inherit.aes

inherit.aes

...

...

Value

ggplot layer with timeline aes draw_key_point

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
 library(magrittr)
 library(dplyr)
 d%>%subset(COUNTRY=="USA" | COUNTRY=="CHINA")%>%subset(DATE>=as.Date("2000-01-01"))%>%
 ggplot(aes(DATE, COUNTRY, colour = DEATHS, size = EQ_PRIMARY, label = LOCATION_NAME)) +
  geom_timeline()+ geom_timeline_label(n_max=5)+
   guides(size = guide_legend("Richter scale value")) +
   guides(colour = guide_colorbar("# Deaths", label.theme = element_text(angle = 45, size = 8 ))) +
   ylab("") +
   theme_classic() +
   theme(legend.position="bottom", axis.line.y = element_blank())
   
## End(Not run)

dddbbb/erquaker documentation built on May 17, 2019, 9:11 a.m.