1

I'd like to reproduce charts consisting of multiple squares representing a value like this one from xkcd: https://xkcd.com/radiation/

I tried to do it by hand in matplotlib, but it seems too cumbersome.

Do you know any library or easy to use code to produce an image with given (count, column_width) automatically?

EDIT: To clarify my goal: Lets say I want to visualize a comparison of the amount of days I went to work vs. the amount of days I did home office. I would like to visualize both counts side by side with the exact number of squares representing the counts. So the input would just be the dictionary a= {'work': 36, 'home_office': 114}

EDIT2: The PyWaffle from this thread did it for me: How to do waffle charts in python? (square piechart)

Thanks

Marcus Campbell
  • 2,746
  • 4
  • 22
  • 36
CurryCurry
  • 11
  • 3
  • Your question is much too general. What did you try? What data do you want to plot? You might have a look at [waffle charts](https://stackoverflow.com/questions/41400136/how-to-do-waffle-charts-in-python-square-piechart) – JohanC Jun 05 '20 at 11:42
  • Thanks for the feedback, I tried to specify more details. Your link is really helpful, I will try to use the mentioned library for waffle charts! – CurryCurry Jun 05 '20 at 12:18
  • 4
    Does this answer your question? [How to do waffle charts in python? (square piechart)](https://stackoverflow.com/questions/41400136/how-to-do-waffle-charts-in-python-square-piechart) – Roim Jun 05 '20 at 17:45

0 Answers0