geom_timeline_label: Function to Annotate the visualized ggplot.

Description Usage Arguments Value Examples

View source: R/Geom_Timeline_Label.R

Description

Function to Annotate the visualized ggplot.

Usage

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

Arguments

mapping

Set of aesthetic mappings created by aes() or aes_(). 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.

data

a dataframe

na.rm

specifies how default missing values are approached

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.

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.

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().

...

additional parameters

Value

ggplot with timeline of the earthquake and the location of the same annotated

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data = system.file('extdata', 'earthquakesData.tsv', package ='masteringSoftwareDevelopmentinR') %>%
data = read_data(data) %>%
eq_clean_data() %>%
dplyr::filter(datetime >= "1980-01-01" & datetime <="2014-01-01" & COUNTRY == c("BRAZIL"))%>%
ggplot() +
geom_timeline_label(aes(x = (datetime, location_name),
size = EQ_MAG_ML, color = DEATHS, fill = DEATHS))

## End(Not run)

SanjayShetty01/masteringSoftwareDevelopmentinR documentation built on Dec. 18, 2021, 12:57 p.m.