plotPie | R Documentation |
Count each event type and draw pie chart
plotPie(
data,
color = "jco",
colid = 2,
alpha = 1,
title = "",
border = "white",
label = FALSE,
show.total.inTitle = FALSE,
DonutChart = FALSE
)
data |
A data.frame or list object. |
color |
ggsci color palette |
colid |
If provide data.frame, column id need to be set |
alpha |
Alpha value in plot |
title |
Pie title |
border |
Border color |
label |
Whether to show labels |
show.total.inTitle |
If to show the total number in title |
DonutChart |
If plot based on donut chart. More beautiful. |
plotPie(ioe.events.df$Type, title = "# of events")
or plotPie(ioe.events.df, col = 2, title = "# of events")
plotPie( rep(c("A", "B", "C"), c(10, 60, 30)) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.