[R-sig-Geo] Creating a color shade between upper and lower bounds of a line plot in R

r@i@1290 m@iii@g oii @im@com r@i@1290 m@iii@g oii @im@com
Fri Apr 5 17:21:37 CEST 2019


Hello there,
I have many line plots on a single graph and would like to somehow create a shaded area between them so that it looks neater and easier to interpret. Something like this:
http://jvoigts.scripts.mit.edu/blog/assets/plot_shaded_pretty.png

I heard that the function "geom_ribbon" was ideal to do this, but is it possible to incorporate this in the basic "plot" command? If so, how?
This is currently what I have done with the basic plotting, which works fine:
plot(get, Hope2, type = "l",col = "green", lwd = "3", xlab="Cumulative CO2 emissions (TtC)", ylab = "One-day maximum precipitation (mm/day)", main = "One-day maximum precipitation for Random Area for CanESM2 scenarios")lines(IPSL, Hope6, type = "l", lwd = "3", col = "green")
lines(MIROC, Hope7, type = "l", lwd = "3", col = "green")
lines(subsetprime, Hope8, type = "l", lwd = "3", col = "green")
lines(MPI, Hope9, type =" l", lwd = "3", col = "green")
So, in this plot, I have 5 green line plots in one. The idea would be shade these in green, from the lower to upper bounds. Is this possible?
Any assistance would be extremely valuable!

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list