This creates a donut chart, similar to a pie chart.
ggla_donut( mapping = NULL, data = NULL, stat = "count", title = NULL, gla_theme = "default", base_size = 14, ... )
mapping | Set of aesthetic mappings created by |
---|---|
data | The data to be displayed in this layer. There are three options: If A A |
stat | The statistical transformation to use on the data for this layer, as a string. Should be either 'count', for the number of cases in each group, or 'identity' to represent values in the data. Default: 'count' |
title | String title to be used for plot. Will appear in the middle of the donut, Default: NULL |
gla_theme | Either "default" or "inverse", Default: 'default' |
base_size | base font size, Default: 14 |
... | Other arguments to be passed on to geom_bar() |
This works by creating a stacked bar chart and converting to polar coordinates.
ggla_donut() understands the following aesthetics (required aesthetics in bold).
y
label (will appear outside the donut)
alpha
colour
fill
group
shape
size
stroke