waffle
waffle copied to clipboard
Waffle creates legend but not actual waffle chart
I'm encountering an error where waffle creates the legend of my waffle chart but not the actual chart itself. This occurs irrespective of graphics device. An example: https://imgur.com/a/nYJqcm9
Here's my R version info in case that is helpful.
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.1
year 2018
month 07
day 02
svn rev 74947
language R
version.string R version 3.5.1 (2018-07-02)
nickname Feather Spray
edit: this happens whether I install from CRAN or GitHub
#ty for trying out the pkg and taking the time to file an issue!
can you include a snippet of reproducible code that I can test with? —thx
Sure!
race <- c(`Asian` = 12501,`Black` = 12831, `Hispanic` = 5023, `White` = 10234)
waffle(race, rows = 5)
This is happening with whatever data I feed into it.
I figured out a solution. Waffle does not like handling the large numbers I gave it. It works best if every number in the vector is less than 100. So if I divide the vector above by 1000 then it makes a chart without any problems.
Your "solution" worked for me. However, it seems Waffle indeed produces the "chart itself" but the rectangles representing you data are just too small to see with the human eye if you have thousands of data points. Producing a very large graphic with larger rectangles should be an option too.