[R] explosed-pie

Prof Brian D Ripley ripley at stats.ox.ac.uk
Wed Dec 13 21:55:25 CET 2000

On Thu, 14 Dec 2000, Paul Murrell wrote:

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

Unfortunately, the `primitive' is for a circle and not an arc.
I suppose one could argue that from 1.2.0 it is accessible
through the .Call interface as the new Rgraphics.h exposes it as

/* Draw a circle, centred on (x,y) with radius r (in inches). */
void GCircle(double x, double y, int coords,
             double radius, int col, int border, DevDesc *dd);

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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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