Learn R Programming

tidypaleo (version 0.1.4)

geom_ribbonh: 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

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.

Arguments

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

See geom_ribbon.

Examples

Run this code
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))

Run the code above in your browser using DataLab