floating.pie {plotrix} | R Documentation |
Displays a pie chart at an arbitrary position on an existing plot
floating.pie(xpos,ypos,x,edges=200,radius=1,col=NULL,startpos=0, shadow=FALSE,...)
xpos,ypos |
x and y position of the center of the pie chart |
x |
a numeric vector for which each value will be a sector |
edges |
the number of lines forming a circle |
radius |
the radius of the pie in user units |
col |
the colors of the sectors - defaults to rainbow |
startpos |
The starting position for drawing sectors in radians. |
shadow |
Logical - whether to draw a shadow |
... |
graphical parameters passed to polygon |
The bisecting angle of the sectors in radians. Useful for placing text labels for each sector.
As with most pie charts, simplicity is essential. Trying to display a complicated breakdown of data rarely succeeds.
Jim Lemon
pie.labels
, boxed.labels
,
polygon.shadow
plot(1:5,type="n",main="Floating Pie test",xlab="",ylab="",axes=FALSE) box() floating.pie(2,4,c(2,4,6,8),radius=0.5) floating.pie(3,3,c(1,4,7,8),radius=0.5) floating.pie(4,2,c(3,4,6,7),radius=0.5,shadow=TRUE)