R-alpha: plot.default(.) : (too?) many "..." --- plot(.., lab =c(10,10,7)) fails
Martin Maechler
Martin Maechler <maechler@stat.math.ethz.ch>
Wed, 21 May 97 10:19:14 +0200
A simple example:
plot(1:10, 1:10, main = "TITLE", lab = c(10,10,7))
#> Error: invalid subscript type
The reason is the call to axis(1, ...) in plot.default(.).
plot.default has the ... arguments in order to pass the many different
possible 'par' options to it's own subfunctions.
Currently, plot.default has
plot.xy(xy, type, col = col, pch = pch, cex = cex, bg = bg, lty = lty, ...)
axis(1, ...)
axis(2, ...)
box(...)
title(main = main, xlab = xlab, ylab = ylab, ...)
In order for this to work, all the subfunctions MUST be tolerant to all
possible argument specifications.
axis(.) is NOT which leads to the above Error.
A different approach would be to "analyze" list(...),
extract relevant parameters and pass them to the different sub-functions of
plot.default(.).
BY THE WAY:
It would be nice to be able to say
par(reset = TRUE)
(or similar) for resetting all the graphical parameters to their (device-dependent)
default values.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-