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 | qplot_waffle_tile(x, rows = NULL, cols = NULL)
|
x |
a variable with not too many unique values |
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 |
This function allows and requires the least tinkering, but also does not drop shadows. To avoid the Hermann grid illusion, don't use dark colours.
adapted from http://shinyapps.stat.ubc.ca/r-graph-catalog/ who adapted it from http://www.techques.com/question/17-17842/How-to-make-waffle-charts-in-R who adapted it from http://ux.stackexchange.com/a/46543/56341
1 | qplot_waffle_tile(rep(1:2,each=500))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.