geom_timeline_label: geom_timeline_label function

Description Usage Arguments Examples

View source: R/geom_timelines.R

Description

Run geom_timeline first to create timeline. This geom will add a vertical line and label to those points.

Usage

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

Arguments

n_max

Integer (default = 5); represents the max number of earthquakes to show.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
ggplot(df, aes(x = date, y = COUNTRY,
               color = as.numeric(TOTAL_DEATHS),
               size = as.numeric(EQ_PRIMARY),
               label = CLEAN_LOCATION_NAME)) +
  geom_timeline() +
  labs(size = "Richter scale value", color = "# deaths") +
  ggplot2::theme(panel.background = ggplot2::element_blank(),
        legend.position = "bottom",
        axis.title.y = ggplot2::element_blank()) + ggplot2::xlab("DATE") +
  geom_timeline_label(data=df)

## End(Not run)

lakrobinson/noaar2 documentation built on Dec. 1, 2020, 9:35 p.m.