# Example 1 -----------------------------------------------------------------
# A set of 3 nested rings rings starting at 315 deg. and ending at 270 deg.
# Values to plot
vals <- c(1,2,3,10)
# Outer (includes labels)
piechart(vals, col=grDevices::blues9[5:8], border=NA, doughnut = .5,
radius=.75, labels=vals, init.angle = 315, last.angle = 270)
# Middle
piechart(vals, col=grDevices::blues9[3:6], border=NA, doughnut = .3,
radius=.5, add=TRUE, init.angle = 315, last.angle = 270)
# Inner
piechart(vals, col=grDevices::blues9[1:4], border="gray", doughnut = .1,
radius=.3, add=TRUE, init.angle = 315, last.angle = 270)
# Example 2 -----------------------------------------------------------------
# Passing values to polygon and playing with the radius and slice.off
piechart(1:10, density=(1:10)^2/2, slice.off = (1:10)/30, doughnut = .5,
radius = sqrt(10:1),
# Here we are setting random labels...
labels=sapply(1:10, function(x) paste(sample(letters, x, TRUE), collapse=""))
)
Run the code above in your browser using DataLab