[R] 'symbols' not plotting correct circle radii

Jim Lemon jim at bitwrit.com.au
Wed Jul 18 14:11:48 CEST 2012

On 07/18/2012 09:42 PM, Sarah Goslee wrote:
> On Wed, Jul 18, 2012 at 6:42 AM, Jim Lemon<jim at bitwrit.com.au>  wrote:
>> On 07/18/2012 08:02 PM, Stuart Leask wrote:
>>> Hi there.
>>> I have been plotting some circles using 'symbols', with radii representing
>>> my data, but the radii looked incorrect.
>>> It seems to happen with a single circle too:
>>> Symbols ( 0, 0, circles = 40, xlim = c(-40, 40), ylim= c(-40, 40))
>>> If I put a ruler up to my monitor (technology!)  to compare the radius
>>> with the axes, the circle isn't radius 40; it is closer to 15...
>>> I suspect there is a simple answer.
>> Hi Stuart,
>> The answer does not appear to be simple. While the documentation for symbols
>> says that the "inches" argument controls the size of the circles, it appears
>> to do so with reference to the user units of the plot, not to that quaint
>> unit descending from the twelfth part of someone's foot. So, whatever
>> numbers you pass as "circles" seem to be scaled to a maximum dimension of
>> whatever "inches" is in user units, at least on the x11 graphics device.
>> From ?symbols:
> If inches is FALSE, the units are taken to be those of the appropriate axes.
> Is that not what's wanted here?
> Sarah
My interpretation was that Stuart wanted circles with radii that were 
the stated value of the "circles" argument in user units. As the 
"inches" argument is TRUE (1) by default, it only seems to serve as a 
scaling factor for the values of the "circles" argument. So, the 
combination of "circles=40" and "inches=1" yields a circle with a radius 
of 1 user unit. When I reran the example with "inches=0.5", I got 
circles with a maximum radius of 0.5 user units. I haven't tested this 
on any device other than x11.


More information about the R-help mailing list