[R] explosed-pie

Paul Murrell paul at stat.auckland.ac.nz
Wed Dec 13 21:56:32 CET 2000


>   Random question to the R cognoscenti: is there a primitive accessible
> through R code for drawing arcs and circles?  Except for symbols(), all of
> the circle- and ellipse-drawing code I've seen breaks the graphics into a
> many-sided polygon ("edges" in piechart()).  This doesn't matter for
> bitmap graphics but for vector graphics it might sometimes be nice to have
> access to such a function ...

There is not a circle() function like there is a rect() function, but the
symbols() function does use primitive circle drawing code rather than a
polygon approximation (mostly**).  So something like symbols(x=5, y=5,
circle=5) draws a circle at position (5, 5).  See help(symbols) for how to
control the size of the circles.  symbols() doesn't do arcs and may be
inconvenient for general circle-drawing tasks so I think there is a good
case for a circle() function.

** From the too-much-detail department:  even the primitive circle drawing
code will approximate the circle with a polygon if it has to do certain
sorts of clipping so it is not guaranteed to produce a circle in all cases.


r-help 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-help-request at stat.math.ethz.ch

More information about the R-help mailing list