[6288] in s-news-athena

home help back first fref pref prev next nref lref last post

Re: Using ...

daemon@ATHENA.MIT.EDU (Scott A. Vander Wiel)
Fri Jan 27 16:23:19 1995

To: s-news@utstat.toronto.edu
From: scottyv@rice.research.att.com (Scott A. Vander Wiel)
Date: Thu, 26 Jan 1995 13:41:32 GMT

In article <9501252204.AA03333@pickard.mast.queensu.ca> dmurdoch@pickard.mast.queensu.ca (Duncan Murdoch) writes:

> Is there an easy way to pass a censored version of ... to axis(), with
> all the non-axis arguments deleted?

I've used the following paradeigm for a similar problem.

plot.foo <- function(x,...){
	  ldots<-list(...)

[calculations]

	  ... <- ldots[is.na(match(names(ldots),gr.state))]
	  plot(x, ...)

[calculations]

	  ... <- ldots[!is.na(match(names(ldots),gr.state))]
	  lines(x, ...)
}

The first assignment to ... pulls out the general graphical parameters
like ylim.  The second pulls out all the others.  The object gr.state
is

> gr.state
 [1] "adj"  "ask"  "bty"  "cex"  "col"  "crt"  "err"  "exp"  "font" "fty" 
[11] "lab"  "las"  "lty"  "lwd"  "mar"  "mex"  "mfg"  "mgp"  "new"  "omd" 
[21] "pch"  "pty"  "smo"  "srt"  "tck"  "usr"  "xaxp" "xaxs" "xaxt" "xpd" 
[31] "yaxp" "yaxs" "yaxt" "fig" 

It is described in the documentation for par().

--
Regards,
 Scott Vander Wiel
 AT&T Bell Labs, Room 2C-277		scottyv@research.att.com
 600 Mountain Avenue			office:	(908) 582-3213
 Murray Hill, NJ 07974-0636		fax:	(908) 582-3340

home help back first fref pref prev next nref lref last post