Dear R user group, I wish to plot small pie-charts to specific coordinates in a e.g. scatter-plot: E.g.:> plot(rnorm(100),rnorm(100)) > points(1,1,col="red",cex=4)-> I wish to put pie(c(2,3)) at the position of the red circle... How can I do this efficiently? Thanking you and wishing you a wonderful Sunday! Georg. ************************** Georg Ehret Johns Hopkins Baltimore USA [[alternative HTML version deleted]]
On Sun, May 4, 2008 at 2:30 PM, Georg Ehret <georgehret at gmail.com> wrote:> Dear R user group, > I wish to plot small pie-charts to specific coordinates in a e.g. > scatter-plot: > > E.g.: > > plot(rnorm(100),rnorm(100)) > > points(1,1,col="red",cex=4) > -> I wish to put pie(c(2,3)) at the position of the red circle... > > How can I do this efficiently?For some discussion of the disadvantages of this type of display, and some suggestions for alternatives, you might like to read http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=00018S. Another interesting page is http://www.math.yorku.ca/SCS/Gallery/minard/minard.pdf, which describes the first use of this technique, by Minard. Hadley -- http://had.co.nz/
Hi Georg Ehret wrote:> Dear R user group, > I wish to plot small pie-charts to specific coordinates in a e.g. > scatter-plot: > > E.g.: >> plot(rnorm(100),rnorm(100)) >> points(1,1,col="red",cex=4) > -> I wish to put pie(c(2,3)) at the position of the red circle... > > How can I do this efficiently?For one approach see "Integrating grid Graphics Output with Base Graphics Output" in R News 3/2 (http://www.r-project.org/doc/Rnews/Rnews_2003-2.pdf) Paul> Thanking you and wishing you a wonderful Sunday! > Georg. > ************************** > Georg Ehret > Johns Hopkins > Baltimore > USA > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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.-- 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/