[R] behaviour of plot(...,type="l")
Thomas Lumley
thomas at biostat.washington.edu
Mon Oct 23 17:37:26 CEST 2000
On Mon, 23 Oct 2000, Kjetil Kjernsmo wrote:
> Dear all,
>
> I have a problem that I guess may be related, it haven't really bothered
> me too much, so I thought it is just me, but it is a bit strange, and
> while we're talking about it:
>
> I have
> > par()$type
> [1] "p"
> and, if I do
> > plot(1:5)
> I get a plot with points, so far so good. Then, I go
> > par(type="l")
> > plot(1:5)
> but it's still points. It should have been a line, shouldn't it?
> > plot(1:5, type="l")
> gives a line, and
> > par("type")
> [1] "l"
> (ahem, yes, I re-RTFM at this point)
plot.default() has an argument type=, so it *always* resets the plotting
type. If you don't specify that argument it resets it to the default, "p".
It could be changed to default to par("type") but I don't see when this
would be helpful.
-thomas
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list