[Rd] cex/col/etc. in title(): documentation? (PR#1136)

maechler@stat.math.ethz.ch maechler@stat.math.ethz.ch
Wed, 31 Oct 2001 11:23:45 +0100 (MET)


>>>>> "Ben" == Ben Bolker <bolker@zoo.ufl.edu> writes:

    Ben>   There appears to be a mismatch between the documentation and
    Ben> behavior of title(), or at least a clarification is in order.  The
    Ben> documentation says you can pass extra arguments from par() as
    Ben> "...".  However, cex at least is ignored. Later on in the
    Ben> documentation it becomes clear that you can specify these extra
    Ben> parameters as part of a list.

No bug.  Here's the clarification:

Contrary to the other implementations of S,
R differentiates different usages of "cex", "col" and "font" :

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

and ?par *does* document this.

Hence the "..." in axis() should really be ``filled'' with cex.axis, etc.

    Ben>   I wouldn't say this is necessarily a bug (and there's certainly
    Ben> a way to do what you want, if you read the rest of the
    Ben> documentation), but I will say it didn't seem to follow the same
    Ben> conventions as most of the rest of the graphical annotation in R.
    Ben> I would have expected title(main="foo",cex=2) to set the title
    Ben> larger ...

The following is an example demonstrating R's possibilities 
    (not as cleanly possible in S-plus AFAIK):

plot(1, col.axis = "sky blue", col.lab = "thistle")
title("Main Title", sub = "sub title", 
      cex.main = 2,   font.main= 4, col.main= "blue",
      cex.sub = 0.75, font.sub = 3, col.sub = "red")

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

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._