From b.rowlingson at lancaster.ac.uk  Tue Jan 23 17:19:27 2007
From: b.rowlingson at lancaster.ac.uk (Barry Rowlingson)
Date: Tue, 23 Jan 2007 16:19:27 +0000
Subject: [Rd] can't plot a line
In-Reply-To: <45B62CC6.1020008@pdf.com>
References: <45B62CC6.1020008@pdf.com>
Message-ID: <45B6358F.3010007@lancaster.ac.uk>

Spencer Graves wrote:
> Consider the following: 
> 
>       plot(0, 0, xlim=c(-10, 10), ylim=c(-50, 50))
>       lines(c(0,0), (2*c(-pi, pi))^2)

  Because squaring is done before multiplication - its higher priority. 
Hence you end up with (-2*pi)^2 and (2*pi)^2, which are the same, and 
your 'line' becomes a dot.

  How about: lines(c(0,0), (2*pi)^2*c(-1,1))

Barry



[Rd] can't plot a line
Barry Rowlingson