Description Usage Arguments Details Value Examples
waffleChart()
is the flatten version of
pieChart()
. It works the best when a pie chart is less straight
forward to reveal distribution of a factor variable.
1 2 | waffleChart(.tbl_df, .group, divisor = NULL, tiles = 100,
title = NULL, size = 2, palette = "Set2", legend_pos = "right")
|
.tbl_df |
A data frame |
.group |
A factor variable |
divisor |
A non-zero positive number |
tiles |
the default number of 100 for the number of tiles displayed on
plotting canvas if |
title |
A string |
size |
A number. |
palette |
A character vector or a string |
legend_pos |
legend position |
A wrapper function inherits from
waffle()
. It spares the data wrangling process
for percentage computation and assemble for a named vector. The wrapper
function also internally deals with conflict between the number of factor
levels and the number of colors supplied to palette via
RColorBrewer.
A ggplot object
1 | waffleChart(invest, age, divisor = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.