Place labels on a pie chart
pie.labels.Rd
Places labels on a pie chart
Usage
pie.labels(x=0,y=0,angles,labels,radius=1.05,bg="white",border=TRUE,
minangle=NA,boxed=FALSE,explode=0,...)
Arguments
- x,y
x and y position of the center of the pie chart
- angles
A numeric vector representing angles in radians. This is the return value of floating.pie.
- labels
Text strings to label each sector.
- radius
The radius at which to place the labels in user units. The default is 1.05.
- bg
The color of the rectangles on which the labels are displayed.
- border
Whether to draw borders around the rectangles.
- minangle
Minimum angle between labels.
- boxed
Whether to use text or boxed.labels to display the labels.
- explode
How much the pie chart has been "exploded".
- ...
Arguments passed to text or boxed.labels.
Details
Labels may be placed within the pie (radius less than the pie radius), on the edge or outside as in the examples below. If within the pie, it is probably best to use boxed=TRUE.
If some labels overlap, passing a value in radians for minangle may be used to spread them out.
Note
Remember that x and y specify the center of the pie chart and that the label positions are specified by angles and radii from that center.