I wrote an R package called ggbraid that extends the functionality of geom_ribbon()
in ggplot2.
ggbraid provides a new stat, stat_braid()
, that, when used with geom_ribbon()
, correctly fills the area between two alternating series (drawn as lines or steps) with two different colors. ggbraid also provides a geom, geom_braid()
, that wraps geom_ribbon()
and uses stat_braid()
by default.
Learn more at nsgrantham.github.io/ggbraid.