[R] Moving averages shading / two colours / polygon

olo alex at fafula.com
Thu Oct 31 17:02:32 CET 2013

I am stuck at the following problem.

I have two moving averages. One is faster than another. After plotting them
I need to shade area between them in green when the faster is above slower
and red where faster is below slower.

Something like this:

I tried with polygon but I can't do it. Any hints?


View this message in context: http://r.789695.n4.nabble.com/Moving-averages-shading-two-colours-polygon-tp4679460.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list