From: Paul Murrell <p.murrell_at_auckland.ac.nz>

Date: Wed, 02 May 2007 08:44:07 +1200

*>
*

> ______________________________________________

*> R-help_at_stat.math.ethz.ch mailing list
*

*> https://stat.ethz.ch/mailman/listinfo/r-help
*

*> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
*

*> and provide commented, minimal, self-contained, reproducible code.
*

Date: Wed, 02 May 2007 08:44:07 +1200

Hi

Paulo Barata wrote:

*> Dr. Snow and Prof. Ripley,
**>
**> Dr. Snow's suggestion, using clipplot (package TeachingDemos),
**> is maybe a partial solution to the problem of drawing an arc of
**> a circle (as long as the line width of the arc is not that large,
**> as pointed out by Prof. Ripley). If the arc is symmetrical around
**> a vertical line, then it is not so difficult to draw it that way.
**> But an arc that does not have this kind of symmetry would possibly
**> require some geometrical computations to find the proper rectangle
**> to be used for clipping.
**>
**> I would like to suggest that in a future version of R some function
**> be included in the graphics package to draw smooth arcs with
**> given center, radius, initial and final angles. I suppose
*

> that the basic ingredients are available in function "symbols"

> (graphics).

Just to back up a few previous posts ...

*> Thank you very much.
**>
**> Paulo Barata
**> (Rio de Janeiro - Brazil)
**>
*

> -----------------------------------------------------------------------

*> Prof Brian Ripley wrote:
*

>> On Tue, 1 May 2007, Greg Snow wrote: >> >>> Here is an approach that clips the circle you like from symbols down to >>> an arc (this will work as long as the arc is less than half a circle, >>> for arcs greater than half a circle, you could draw the whole circle >>> then use this to draw an arc of the bacground color over the section you >>> don't want): >>> >>> library(TeachingDemos) >>> plot(-5:5, -5:5, type='n') >>> clipplot( symbols(0,0,circles=2, add=TRUE), c(0,5), c(0,5) ) >> I had considered this approach: clipping a circle to a rectangle isn't >> strictly an arc, as will be clear if the line width is large. >> Consider >> >> clipplot(symbols(0, 0 ,circles=2, add=TRUE, lwd=5), c(-1,5), c(-1,5)) >> >> Note too that what happens with clipping is device-dependent. If R's >> internal clipping is used, the part-circle is converted to a polygon. >> >>

> ______________________________________________

-- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul_at_stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/ ______________________________________________ R-help_at_stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.Received on Tue 01 May 2007 - 20:51:08 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Tue 01 May 2007 - 22:31:16 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*