Skip to content
Prev 386072 / 398513 Next

How to shade area between lines in ggplot2

I don't know if I can find a case similar to my need.
I tried with:
```
p = p + geom_abline(slope = slope_1, intercept = intercept_1, col =
"royalblue4")
p = p + geom_line() +
  geom_hline(yintercept = 5) +
  theme_classic() +
  geom_ribbon(aes(ymin=intercept_1 - 1/w[2],ymax=intercept_1 +
1/w[2]), fill="blue")
```
but did not work.
Thanks anyway
On Fri, Oct 23, 2020 at 10:26 AM PIKAL Petr <petr.pikal at precheza.cz> wrote: