[Rd] plot.mts() with type="p" (PR#1010)

Achim Zeileis zeileis@ci.tuwien.ac.at
Wed, 04 Jul 2001 11:09:08 +0200


Ray.Brownrigg@mcs.vuw.ac.nz wrote:
> 
> There appears to be a bug in plot.mts() in R-1.3.0 when attempting to
> do a multiple point plot (this worked in 1.2.2).
>
> > plot.mts(ts(matrix(runif(10), ncol = 2)), type = "p")
> Error in plot.ts(x[, i], axes = FALSE, xlab = "", ylab = "", log = log,  :
>         formal argument "type" matched by multiple actual arguments

Yes, this seems to be a bug. The reason is the new panel argument in
plot.mts. Every single plot in plot.mts is set up by:

        plot(x[, i], axes = FALSE, xlab="", ylab="",
             log = log, col = col, bg = bg, pch = pch, ann = ann,
             type="n", ...)
        panel(x[, i], col = col, bg = bg, pch = pch, ...)

And I suspect you don't really need to pass the ... argument to
plot(type="n") because what you really see is what panel produces after
that. If you remove the ... in plot the example above works. It also
works, if both commands are replaced by a single

        panel(x[, i], axes = FALSE, xlab="", ylab="",
             log = log, col = col, bg = bg, pch = pch, ann = ann,
             ...)

Hope this helps
Achim


---------------------------
Achim Zeileis
Institut für Statistik
Technische Universität Wien
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._