GeomTimelineLabel: Create the ggproto object for geom_timeline_label

Description Usage Format Examples

Description

This function creates the ggproto Geom object to plot the necessary grid grob for geom_timeline_label

Usage

1

Format

An object of class GeomTimelineLabel (inherits from Geom, ggproto) of length 5.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data('clean_NOAA')
NOAA <- clean_NOAA
plot_NOAA <- NOAA[NOAA$COUNTRY=="USA" | NOAA$COUNTRY=="CANADA",]
xmin <- lubridate::ymd("2010-01-01")
xmax <- lubridate::ymd("2017-07-01")
plt <- ggplot2::ggplot(data = plot_NOAA, ggplot2::aes(x = DATE, y = COUNTRY)) +
  geom_timeline(ggplot2::aes(size = EQ_PRIMARY), x_min = xmin, x_max = xmax) +
  geom_timeline_label(ggplot2::aes(label = LOCATION_NAME, magnatude = EQ_PRIMARY),
     x_min = xmin, x_max = xmax, top_x_mag = 5) +
  ggplot2::theme_minimal()
print(plt)

jmmark/QuakeCoursera documentation built on May 3, 2019, 5:18 p.m.