Learn R Programming

plotrix (version 1.41)

floating.pie: Display a floating pie chart

Description

Displays a pie chart at an arbitrary position on an existing plot

Usage

floating.pie(xpos,ypos,x,edges=200,radius=1,col=NULL,...)

Arguments

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
...
graphical parameters passed to polygon

Value

  • The bisecting angle of the sectors in radians. Useful for placing text labels for each sector.

See Also

pie.labels, boxed.labels

Examples

Run this code
pieval<-c(2,4,6,8)
 plot(1:5,type="n")
 floating.pie(3,3,pieval)

Run the code above in your browser using DataLab