geom_timeline: Geom for creating a timeline from earthquake data

Description Usage Arguments Examples

View source: R/geom_timeline.R

Description

This function creates a new geom to create a timeline for a specified data range and plots each earthquake as a point on that timline

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
geom_timeline(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  show.legend = NA,
  na.rm = FALSE,
  inherit.aes = TRUE,
  ...
)

Arguments

mapping

Set of aesthetis mappings created by aes.

data

The data to be displayed in this layer.

stat

Override the default connection between geom_timeline_label and stat_timeline_label(however I have not written a stat for this geom).

position

Position adjustment, either as a string, or the result of a call to position adjustment function.

show.legend

logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes. It can also be a named logical vector to finely select the aesthetics to display.

na.rm

If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.

inherit.aes

If FALSE, overrides the default aesthetics, rather than combining with them.

...

Other arguments passed on to link[ggplot2]{layer}.

Examples

1
2
3
4
5
## Not run: 
ggplot(data = eq, aes(x = Date, y = Country,
color = Deaths, size = Mag)) + geom_timeline(alpha = 0.2)

## End(Not run)

ankit2219/masteringr documentation built on Dec. 24, 2021, 1:25 a.m.