R/legend.pie.R

Defines functions legend.pie

Documented in legend.pie

legend.pie <-
function(x,y=NULL,z=NULL,labels,radius=1,bty='o',mab=1.2,bg=NULL,inset=0,...){
  if(is.null(z)) z <- rep(1,length.out=length(labels))
  box <- legend.box(x,y,radius,mab,inset)
  if(bty=='o') rect(box[1],box[2],box[3],box[4],col=bg)
  x <- (box[1]+box[3])/2
  y <- box[4]+mab*radius
  add.pie(z,x,y,labels,radius,...)
}

Try the mapplots package in your browser

Any scripts or data that you put into this service are public.

mapplots documentation built on Aug. 25, 2023, 5:15 p.m.