Description Usage Arguments Details Examples
View source: R/feedback_plotting.R
Pass in a a variable and get a waffle plot. Useful to display simple counts or if the variable has different values, a square pie chart. If the variable has a length that makes the individual squares hard to see, consider showing hundreds, thousands etc.
1 2 | qplot_waffle(x, shape = 15, rows = NULL, cols = NULL,
drop_shadow_h = -0.3, drop_shadow_v = 0.3)
|
x |
a variable with not too many unique values |
shape |
defaults to a filled square |
rows |
defaults to the rounded up square root of the number of values |
cols |
defaults to the rounded down square root of the number of values |
drop_shadow_h |
horizontal offset of the drop shadow, tinker with this to get a proper shadow effect |
drop_shadow_v |
vertical offset of the drop shadow |
To avoid the Hermann grid illusion, don't use dark colours.
1 | qplot_waffle(rep(1:2,each=200))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.