geom_ribbonh: Vertical ribbons and area plots

View source: R/ggstrat-geoms.R

geom_ribbonhR Documentation

Vertical ribbons and area plots

Description

Vertical ribbons and area plots

Usage

geom_ribbonh(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "identity",
  ...,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE
)

GeomRibbonh

geom_areah(
  mapping = NULL,
  data = NULL,
  stat = "identity",
  position = "stackv",
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = TRUE,
  ...
)

GeomAreah

Arguments

mapping, data, stat, position, na.rm, show.legend, inherit.aes, ...

See geom_ribbon.

Format

An object of class GeomRibbonh (inherits from Geom, ggproto, gg) of length 6.

An object of class GeomAreah (inherits from GeomRibbonh, Geom, ggproto, gg) of length 4.

Examples

library(ggplot2)

# Generate data
huron <- data.frame(year = 1875:1972, level = as.vector(LakeHuron))
h <- ggplot(huron, aes(y = year))

h + geom_ribbonh(aes(xmin=0, xmax=level))
h + geom_areah(aes(x = level))

# Add aesthetic mappings
h +
  geom_ribbonh(aes(xmin = level - 1, xmax = level + 1), fill = "grey70") +
  geom_lineh(aes(x = level))


paleolimbot/tidypaleo documentation built on Jan. 25, 2023, 2:43 a.m.