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

**Ray.Brownrigg@mcs.vuw.ac.nz
**
Ray.Brownrigg@mcs.vuw.ac.nz

*Tue, 3 Jul 2001 22:36:00 +0200 (MET DST)*

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).
Reproduce by:
>* version
* _
platform sparc-sun-solaris2.8
arch sparc
os solaris2.8
system sparc, solaris2.8
status
major 1
minor 3.0
year 2001
month 06
day 22
language R
>* 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
>* traceback()
*3: plot.ts(x[, i], axes = FALSE, xlab = "", ylab = "", log = log,
col = col, bg = bg, pch = pch, ann = ann, type = "n", ...)
2: plot(x[, i], axes = FALSE, xlab = "", ylab = "", log = log, col = col,
bg = bg, pch = pch, ann = ann, type = "n", ...)
1: plot.mts(ts(matrix(runif(10), ncol = 2)), type = "p")
>*
*The problem is that plot.mts calls plot() with an explicit type = "n"
as well as ..., so the type argument is sent twice.
My short-term solution is to change plot.mts() so that:
for (i in 1:nser) {
plot(x[, i], axes = FALSE, xlab = "", ylab = "", log = log,
col = col, bg = bg, pch = pch, ann = ann, type = "n",
...)
becomes:
for (i in 1:nser) {
plot(x[, i], axes = FALSE, xlab = "", ylab = "", log = log,
col = 0, bg = bg, pch = pch, ann = ann,
...)
Ray Brownrigg
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._