waffle icon indicating copy to clipboard operation
waffle copied to clipboard

Waffle creates legend but not actual waffle chart

Open JustGottaCAT opened this issue 7 years ago • 4 comments

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

JustGottaCAT avatar Aug 03 '18 20:08 JustGottaCAT

#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

hrbrmstr avatar Aug 03 '18 20:08 hrbrmstr

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.

JustGottaCAT avatar Aug 03 '18 20:08 JustGottaCAT

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.

JustGottaCAT avatar Aug 22 '18 16:08 JustGottaCAT

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.

RemNil avatar Aug 02 '21 18:08 RemNil