[R] rect() does not work

Marc Schwartz marc_schwartz at comcast.net
Sat Jun 16 01:38:27 CEST 2007


On Fri, 2007-06-15 at 16:22 -0700, scott flemming wrote:
> I have typed the following commands:
> 
> >x <- c(1:10)
> >y <- x
> >plot(x,y)
> >rect(2,2,4,4)
> 
> I am expecting a rectangular box, however, nothing occurs.

What version of R?  What OS?

No problems here using R version 2.5.0 Patched (2007-06-05 r41831) on
F7.

You might want to check and see what par("lty") and par("lwd") return,
in case they have been set to values resulting in lines that you would
not be able to see.

BTW, the c() is not required in creating 'x':

> x <- 1:10
> x
 [1]  1  2  3  4  5  6  7  8  9 10


Marc Schwartz



More information about the R-help mailing list