xyplot time series with positive values in green, negative in red, in R

Viewed 1095

Is there a neat way to color negative values in red and others in green for a (simplified) time series plot below, using lattice::xyplot?

set.seed(0)
xyplot(zoo(cumsum(rnorm(100))), grid=T)

enter image description here

4 Answers
Related