geom_timeline: Geom for for plotting a time line of earthquakes with a point...

Description Usage Arguments Examples

View source: R/module2.R

Description

This function creates a new geom to plot a timeline for a data range and points for each earthquake

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 aesthetics mappings created by aes

data

The data to be displayed in this layer

stat

not working (no stat functionality)

position

Position adjustment

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 to layer

Examples

1
2
3
4
5
6
7
8
## Not run: 
dataset %>% filter((Year> 2010) &  (Country =="INDIA")) %>%
   ggplot(ggplot2::aes(x = Date,
            y = Country,
            color = Deaths,
            size = Mag)) + geom_timeline(alpha = 0.2)

## End(Not run)

BFavetto/EarthquakeAnalysis documentation built on Dec. 17, 2021, 9:50 a.m.