[Rd] can't plot a line

Barry Rowlingson
2007-01-23T16:19:27Z

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