geom_timeline: Timeline charts

Description Usage Arguments Value Examples

Description

This geom creates a timeline of events and adds it to a plot.

Usage

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

Arguments

mapping

Set of aesthetic mappings created by aes or aes_.

data

The data to be displayed. If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

na.rm

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

stat

The statistical transformation to use on the data for this layer, as a string.

position

Position adjustment, either as a string, or the result of a call to a 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.

inherit.aes

If FALSE, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. borders.

...

other arguments passed on to layer.

Value

A GeomTimeline layer

Examples

1
2
3
4
## Not run: eq_data %>% eq_clean_data() %>% filter(EQ_PRIMARY > 6, DATE > "2000-01-01") %>%
ggplot(aes(x = DATE, size = EQ_PRIMARY, color = DEATHS, y = COUNTRY)) +
geom_timeline()
## End(Not run)

rafaelcb/NOAA documentation built on May 9, 2019, 1:16 p.m.