geom_timeline: Plot Timeline

Description Usage Arguments Value Examples

View source: R/geom_timeline.R

Description

This method acts behind de scenes creating a layer to plot the output of GeomTimeline function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
geom_timeline(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  na.rm = FALSE,
  xmin = lubridate::dmy("01/01/2010"),
  xmax = lubridate::dmy("01/01/2016"),
  ctry = "JAPAN",
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

A set of aesthetic mappings created by aes()

data

A dataframe object containing the earthquake data points from the eq_location_clean function that is to be displayed in this layer of the plot

stat

A string representing the statistical transformation for this layer of the plot

position

A string representing the positional adjustment

na.rm

A logical value to indicate whether to raise warning when missing values are removed for the plot

xmin

An integer representing the minimum date value using the lubridate::dmy("dd/mm/yyyy") function, inclusive

xmax

An integer representing the maximum date value using the lubridate::dmy("dd/mm/yyyy") function, exclusive

ctry

A string representing the country filter for the plot

show.legend

A logical value to indicate whether this layer of the plot should be included in the legends

inherit.aes

A logical value to indicate whether to override the default aesthetics or to combine with them

...

A list representing other aesthetics to be passed on to this layer of the plot

Value

Creates a layer to plot the GeomTimeline output function. Updates the graphic inserting new content/visuals.

Examples

1
2
3
4
5
## Not run: ggplot(data = y, aes(x = DATE, country = COUNTRY, label = LOCATION, 
                     magnitude = MAGNITUDE)) + 
  geom_timeline(ctry = "USA", xmin = dmy("01/01/2010"), xmax = dmy("01/01/2016")) +
  theme_classic()
## End(Not run)

hsuzero/Rcapstone_w6 documentation built on Dec. 20, 2021, 4:50 p.m.