From ripley at stats.ox.ac.uk  Wed Jan 18 16:05:25 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Wed, 18 Jan 2006 15:05:25 +0000 (GMT)
Subject: [Rd] symbols function -- possible enhancements
In-Reply-To: <17358.599.749665.458231@stat.math.ethz.ch>
References: <Pine.LNX.4.43.0601171337360.7252@hymn06.u.washington.edu>
	<Pine.LNX.4.61.0601172306550.32358@gannet.stats>
	<17358.599.749665.458231@stat.math.ethz.ch>
Message-ID: <Pine.LNX.4.61.0601180932580.7771@gannet.stats>

On Wed, 18 Jan 2006, Martin Maechler wrote:

> Hi Jean,
>
> now that you've been told  `the truth' ..  :
>
> If you'd like to carefully look at symbols() and its help page and see
> which arguments ('axes' but maybe more) would be useful to pass
> to plot.default and if you provide enhanced versions of the two files
>     https://svn.r-project.org/R/trunk/src/library/graphics/R/symbols.R
> and  https://svn.r-project.org/R/trunk/src/library/graphics/man/symbols.Rd
>
> I'll gladly look at them and incorporate them for R 2.3.0
> (unless they break something)

I am not at all sure this is a good idea.  We have a standard way (x/yaxt) 
to suppress axes.  Let's not propagate the myth that axes=FALSE is 
standard, as then people will expect it in all plot() methods.  (We have 
been here several times before when people have made that incorrect 
assumption.)

symbols() is just one of a range of high-level graphics functions such as 
(the default methods of) barplot, boxplot, contour, coplot, dotchart, 
image, hist, pairs, stars, sunflowerplot.  A few do have an 'axes' 
argument and others accept one (and most were wrongly documented) and 
others do not.  In general the S originals do not have an axes or ... 
argument, and R has added them rather inconsistently.  My preference would 
be that ... is used only for graphics parameters, but clearly we cannot 
get from here to there.

>
> Best regards,
> Martin Maechler
>
>
>>>>>> "BDR" == Prof Brian Ripley <ripley at stats.ox.ac.uk>
>>>>>>     on Tue, 17 Jan 2006 23:15:19 +0000 (GMT) writes:
>
>    BDR> On Tue, 17 Jan 2006, Thomas Lumley wrote:
>    >> On Tue, 17 Jan 2006, Jean Eid wrote:
>    >>
>    >>> Hi
>    >>>
>    >>> I do not get why the symbols function produces warnings when axes=F is
>    >>> added. The following example illustrate this
>    >>>
>    >>>> symbols(0,10, inches=T, circles=1, axes=F, xlab="", ylab="")
>    >>> Warning message:
>    >>> parameter "axes" could not be set in high-level plot() function
>    >>>
>    >>>
>    >>> I augmented symbols and added the axes=F argument to the plot function
>    >>> inside the original symbols function. It works as expected, no warning
>    >>> message. I am just lost as to why the extra arguments in symbols (...)
>    >>> are not behaving as expected.
>    >>>
>    >>
>    >> The ... argument is also passed to .Internal, and presumably the code
>    >> there gives the warning.
>
>    BDR> Indeed.  axes=F is not in the allowed list
>
>    BDR> ...: graphics parameters can also be passed to this function, as
>    BDR> can the plot aspect ratio 'asp' (see 'plot.window').
>
>    BDR> People confuse 'axes' with the graphics parameters, but it is in fact an
>    BDR> argument to plot.default.  (The corresponding graphics parameters
>    BDR> xaxt and yaxt do work.)  R-devel gives a more informative message:
>
>    >> attach(trees)
>    >> symbols(Height, Volume, circles = Girth/24, inches = FALSE, axes=F)
>    BDR> Warning message:
>    BDR> "axes" is not a graphical parameter in: symbols(x, y, type, data, inches,
>    BDR> bg, fg, ...)
>
>    BDR> We do ask people to read the help pages before posting for a good reason:
>    BDR> the information is usually there in a more complete and accurate form than
>    BDR> people remember.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] symbols function -- possible enhancements
Prof Brian Ripley