Re: [Rd] can't plot a line

From: Barry Rowlingson <>
Date: Tue 23 Jan 2007 - 16:19:27 GMT

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 mailing list Received on Wed Jan 24 03:14:47 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 23 Jan 2007 - 16:31:12 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.