[R] symbols function

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jan 18 00:15:19 CET 2006


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.

Indeed.  axes=F is not in the allowed list

      ...: graphics parameters can also be passed to this function, as
           can the plot aspect ratio 'asp' (see 'plot.window').

People confuse 'axes' with the graphics parameters, but it is in fact an 
argument to plot.default.  (The corresponding graphics parameters
xaxt and yaxt do work.)  R-devel gives a more informative message:

> attach(trees)
> symbols(Height, Volume, circles = Girth/24, inches = FALSE, axes=F)
Warning message:
"axes" is not a graphical parameter in: symbols(x, y, type, data, inches, 
bg, fg, ...)

We do ask people to read the help pages before posting for a good reason: 
the information is usually there in a more complete and accurate form than 
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




More information about the R-help mailing list