You can remove the legend names, assuming there are none
that are also plot names, like this (untested):
args <- list(...)
legnams <- intersect(names(args), names(formals(legend))]
do.call("plot", replace(args, legnams, NULL))
On 3/2/06, Dimitris Rizopoulos <[EMAIL PROTECTED]> wrote:
> Dear R-de
See e.g. graphics:::plot.POSIXct, which contains
axisInt <- function(x, type, main, sub, xlab, ylab, col,
lty, lwd, xlim, ylim, bg, pch, log, asp, axes, frame.plot,
...) axis.POSIXct(1, x, ...)
You could use such as wrapper for legend, in your case probably to pick
out jus
Dear R-devels,
I'd like to create a plot method for a class of objects that passes
the '...' argument to both plot() and legend(), e.g.,
x <- list(data = rnorm(1000))
class(x) <- "foo"
plot.foo <- function(x, legend = FALSE, cx = "topright", cy = NULL,
...){
dx <- sort(x$data)
plot(dx,