Description Usage Arguments See Also Examples
This function draws a pie chart of the values of variable 'Xvar'
with the labels from the categorical variable 'Labels'.
Expects aggregated data.
1 2 3 4 5 6 | plotPie(
.data,
xvar = "",
labels = "",
fill_colors = EcdcColors(col_scale = "qual", n = nrow(.data))
)
|
.data |
dataframe containing the variables to plot |
xvar |
character string, name of the numerical variable to plot in quotes |
labels |
character string, name of the character variable including the corresponding labels |
fill_colors |
vector of character strings, hexadecimal colours
to use for each labels in the piechart; the vector should contain
the exact number of categories defined in |
Internal function: EcdcColors
Required Packages: ggplot2
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.