Re: [R] shadow between two lines in plot()

2007-08-02 Thread Jim Lemon
Ding, Rebecca wrote: Dear R users, I used the following code to draw a scatter plot. plot(x,y,type=n) points(x,y,pch=1) And then I used the abline functions to draw two lines. I want to add the shadow between those two lines. abline(h=200) abline(h=300) Any suggestions? Hi

[R] shadow between two lines in plot()

2007-08-01 Thread Ding, Rebecca
Dear R users, I used the following code to draw a scatter plot. plot(x,y,type=n) points(x,y,pch=1) And then I used the abline functions to draw two lines. I want to add the shadow between those two lines. abline(h=200) abline(h=300) Any suggestions? Thanks Rebecca

Re: [R] shadow between two lines in plot()

2007-08-01 Thread Stephen Tucker
see ?rect, or, for more general shapes, ?polygon ## EXAMPLES plot(c(0,500),c(0,500),type=n,las=1) rect(par(usr)[1],200,par(usr)[2],300,col=grey90) points(seq(0,500,length=3),seq(0,500,length=3)) plot(c(0,500),c(0,500),type=n,las=1) polygon((par(usr)[1:2])[c(1,1,2,2)],