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)],
        (c(200,300))[c(1,2,2,1)],col="grey90")
points(seq(0,500,length=3),seq(0,500,length=3))



--- "Ding, Rebecca" <[EMAIL PROTECTED]> 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?
> 
> Thanks
> 
> Rebecca
> 
> --------------------------------------------------
> This e-mail and any files transmitted with it may contain pr...{{dropped}}
> 
> ______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to