Re: [R] rect() does not work

From: Marc Schwartz <marc_schwartz_at_comcast.net>
Date: Fri, 15 Jun 2007 18:38:27 -0500

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



R-help_at_stat.math.ethz.ch 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. Received on Fri 15 Jun 2007 - 23:54:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 16 Jun 2007 - 00:31:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.