View source: R/ggstrat-geoms.R
geom_ribbonh | R Documentation |
Vertical ribbons and area plots
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
mapping, data, stat, position, na.rm, show.legend, inherit.aes, ... |
See geom_ribbon. |
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.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.