Skip to content

piechart

3 messages · Sybille Wendel (Udata), PIKAL Petr, Jim Lemon

#
dear R-community,

Is it possible to have one pie chart of a large radius and then a pie
chart with smaller radius placed on top of the larger so the centers of
the two pie charts coincide?
I managed to place a filled circle with smaller radius in the piechart, 
see below.

Thanks in advance, Sybille


pie(rep(1,12), col=rainbow(24), radius=0.9, labels= 
c("J","F","M","A","M","J","J","A","S","O","N","D"),clockwise=T)
points (0,0,col="black",cex=20,pch=1
#
Hi

Use par(new=TRUE)
before calling new plot

pie(rep(1,12), col=rainbow(24), radius=0.9)
par(new=TRUE)
pie(rep(1,12), col=topo.colors(24), radius=0.5)

But use piechearts only when you want to deceive your audience.

Regards
Petr


r-help-bounces at r-project.org napsal dne 08.12.2010 09:08:13:
http://www.R-project.org/posting-guide.html
#
On 12/08/2010 07:08 PM, Sybille Wendel (Udata) wrote:
Hi Sybille,
Try this after plotting the first pie

library(plotrix)
floating.pie(0,0,rep(1,12), col=rainbow(24), radius=0.5)

You might find that the subplot function in the TeachingDemos package 
will also be useful.

Jim