Skip to content
Prev 277938 / 398506 Next

Producing plot using polygon function

On 19.11.2011 20:19, avinash barnwal wrote:
ggplot2 may be a nice package, but it won't help if you do not 
understand the underlying issues. Your code is too incomplete so that we 
cannot fix it. Better think about how you would draw a polygon manually 
and what you did in R.

And note that in

polygon(c(time[1:j],time[1:j]),c(x,y),col="grey")

Your time vector does not fit to x nor y (and you probably want to 
reverse the second entries in each c() call.

Uwe Ligges