[Rd] axis() default values for "lty", "lwd", and "col"

Martin Maechler maechler at stat.math.ethz.ch
Wed May 21 13:06:28 MEST 2003


I understand your wish, but as Prof Ripley said, 
we have very good reasons to not got that way.
For your situation, please use global  par() settings.

But for the general problem, I'm musing on a bit... :

1.  One should use  library(grid) {plus sometimes (lattice)}
    instead, but given the current non-compatibility with
    base graphics, this won't always work.

  R has more  par() options than AT&T S or S-plus -- exactly for
  the purpose of setting col/cex/... setting for axis labels separately,
  and (as Prof Ripley suggested) on purpose we're not taking other
  global par() settings for drawing of the axis() line {and the box() around!}.

Consider e.g.

  > nP <- names(par(no.readonly = TRUE))

  > nP[grep("^col",nP)]
  [1] "col"      "col.axis" "col.lab"  "col.main" "col.sub" 

  > nP[grep("axis",nP)]
  [1] "cex.axis"  "col.axis"  "font.axis"

  > example(axis)


  > plot(1:10, col.axis = "red", cex.axis = 2)

which does use double-sized axis *labels* in red.
If you read help(par), you'll see that the *.axis parameters are
used for axis *annotation* only.
One thing which would not break back-compatibility  I could
imagine is to introduce more par attributes:

and default the axis() arguments to these.

Further, the box(lty = ) {and implicit "lwd" and "col") arguments would
also need new par() defaults {or have to default to the the
above *.axline ones}.

Finally, one might consider yet another set of par()s and
high-level plot arguments :

"col.ALL", "lty.ALL" , "lwd.ALL"
(and "cex.ALL" ?)  would change all the  col.* {or lty.* or ...}
at once.

Not sure these additions (and entailing complications) are
worth the effort.


Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><

More information about the R-devel mailing list