.BG
.VE $Header: /usr3/s/current/s/.help/RCS/pie,v 1.3 84/05/16 15:03:39 rab Exp $
.FN pie
.TL
pie: Pie Charts
.CS
pie(x, names, size, inner, outer, explode, angle, density, col, rotate)
.PP
.AG x
vector of relative pie slice sizes.
The `i'th slice will take the fraction `abs(x[i])/sum(abs(x))' of the pie.
The slices start with a horizontal line to the right and go counter-clockwise.
.AG names
optional character vector of slice labels.  Labels are
positioned along the center-line of the slice, and are
shifted as far in toward the center as possible without
overlapping into adjacent slices (see arguments `inner', `outer', and `rotate').
.AG size
optional fraction of the short dimension of the plot taken
up by the circle.  Default .75.
.AG inner
optional fraction giving the innermost position that labels can
occupy.  The default value of .3 means that labels can go no
further toward the center than .3 of the radius.
.AG outer
optional fraction giving the outer limit for starting the labels,
default 1.1.
.AG explode
logical vector specifying slices of the pie which should be exploded
(moved out from the center).
.AG angle
optional vector giving the angle (degrees, counter-clockwise
from horizontal) for shading each slice.
(Defaults to 45 if `density' is supplied.)
.AG density
optional vector for pie shading, giving the number of lines
per inch for shading each slice.
Defaults to 5 if `angle' is supplied.
A density of 0 implies solid filling, and is the default if
`col' is specified but angle is not.
Negative values of density produce no shading.
.AG col
optional vector giving the colors in which the pie slices
should be filled or shaded.
If `col' is specified and neither `angle' nor `density' are given
as arguments, slices will be filled solidly with the colors.
.AG rotate
logical flag controlling rotation of slice labels.
If TRUE, the default, `names' are drawn parallel to the center line
of each slice.
If FALSE, `names' are drawn horizontally.  This is convenient if the
graphics device has a limited capability for character rotation.
.PP
Solid filling of pie slices is dependent on the area-filling capability
of the device driver.  For devices without explicit area-filling capability,
solid filling can be simulated by specifying a very high density shading.
.PP
Graphical parameters may also be supplied as arguments to this
function (see `par').
.EX
pie(revenues,revenue.class)

pie(expenses,c("Interest","Materials","Payoffs"),inner=.5,
   outer=.5,size=1)  # force labels to start halfway out

pie(revenues, explode= revenues>.1*sum(revenues) )
   # explode any piece larger than 10% of the sum

pie(revenues, col=seq(revenues), inner=1.1, rotate=F,
	names=revenue.class)  # colored slices with external labels

# the example plot is produced by:
datatel<-?col(telsam.response,sum)
pie(datatel,telsam.collab)
title(main="Response to Quality of Service Questions\n
concerning Telephone Service")
.PI
.KW plot*
.KW hplot*
.KW reports
.WR
