pie_bake_pro | R Documentation |
This function allows you to create cool pie charts easily by providing just
the data and a template among the available ones. Moreover, you can optionally
specify a title for the chart and a name for the categories.
Using this function you can create some complex and extravagant pie charts.
If you are looking for something more classical (and probably more understandable),
check out the pie_bake
function.
pie_bake_pro(data, template, group_name = "group", title = "")
data |
A data frame (or a tibble) with two variables (columns):
Please note that the labels are automatically sorted in alphabetical order.
If you want to specify a particular order, it is recommended to type numbers or
letters before the category names (e.g. "a. category1", "b. category2", ...). |
template |
The chosen template. |
group_name |
A string. If you want, you can specify a name for the categories. |
title |
A string. If you want, you can specify the title of the graph. |
A ggplot object (or no value if the chosen template is among the spider chart ones). In particular, this function returns a pie (or similar) chart according to the data, the choice of template, and the other specifications provided.
See all the available templates displayed here!
example <- data.frame(
c("a. This", "b. Is", "c. Just", "d. An", "e. Example"),
c(2.9, 6.9, 4.20, 13.12, 6.66)
)
pie_bake_pro(
data = example,
template = "eaten3",
group_name = "cat:",
title = "Example1"
)
pie_bake_pro(
data = example,
template = "dart1",
title = "Example2!"
)
pie_bake_pro(
data = example,
template = "eye5",
group_name = "GROUPS:"
)
pie_bake_pro(
data = example,
template = "spider2"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.