So I have two sets of data, and I was wondering if it was possible to plot them as an overlapping line graph (which I know how to do) with the space between them (varA >= varB for all data points) shaded. Is there a way to do this in GGPlot, or is there another way around this?
Asked
Active
Viewed 44 times
-3
-
You may have to get into drawing polygons like [this](http://stackoverflow.com/questions/3494593/shading-a-kernel-density-plot-between-two-points) or [here](http://stackoverflow.com/questions/9675403/r-ggplot2-create-a-shaded-region-between-two-geom-abline-layers). You can show everyone research effort by looking at these questions and answers and report back what worked and what didn't http://stackoverflow.com/search?q=%5Bggplot2%5D+shade+area – Pierre L Nov 19 '15 at 19:36
-
You could also consider providing a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Heroka Nov 19 '15 at 19:54
1 Answers
0
Not sure exactly what you are trying to do, but it might work to plot varA as a shaded area plot and then also plot varB as a shaded area plot but match the background color.

Ezra Boyd
- 311
- 2
- 9