pies | R Documentation |
This function plots a pie graph. Unlike pie
, it can be used to add a pie graph to an existing plot.
pies(
x,
add = FALSE,
xPos = 0,
yPos = 0,
radius = 0.8,
col = base::seq_along(x),
border = "black",
aspect = TRUE,
...
)
x |
a Numeric vector of non-negative numerical quantities. These values are displayed as the areas of pie slices. |
add |
Logical, if |
xPos |
Numeric, the x-coordinate of the center of the pie (ignored if |
yPos |
Numeric, the y-coordinate of the center of the pie (ignored if |
radius |
Numeric, radius of pie in plot units. |
col |
Character or integer, color(s) with which to fill pie slices. |
border |
Character or integer, color(s) with which to draw border of pie slices. |
aspect |
Logical, if |
... |
Arguments to pass to |
pie
polygon
plot(0, 0, xlim=c(-1, 1), ylim=c(-1, 1))
pies(1:3, add=TRUE)
pies((1:10)^2, add=TRUE, xPos=1, yPos=0.5, radius=0.2)
pies(c(1, 10), add=TRUE, xPos=-0.5, yPos=0, radius=0.4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.