Multiple waffle charts with the same size of tiles

I am using R package "waffle" to make several charts with different values (only single value [infected] varies).

This is the code:

waffle(c(infected = 47.495, nurses = 18.011, beds = 19.600), rows = 10, size = 2, colors = c("#e35f5f","#8ed9f5","#a19e9a"),
         legend_pos = "bottom",   title = "If 5% of the population gets infected with Covid-19")
  
  waffle(c(infected = 94.991, nurses = 18.011, beds = 19.600), rows = 10, size = 2, colors = c("#e35f5f","#8ed9f5","#a19e9a"),
         legend_pos = "bottom",   title = "If 10% of the population gets infected with Covid-19")
  
  waffle(c(infected = 142.487, nurses = 18.011, beds = 19.600), rows = 10, size = 2, colors = c("#e35f5f","#8ed9f5","#a19e9a"),
         legend_pos = "bottom",   title = "If 15% of the population gets infected with Covid-19")
  
  waffle(c(infected = 189.983, nurses = 18.011, beds = 19.600), rows = 10, size = 2, colors = c("#e35f5f","#8ed9f5","#a19e9a"),
         legend_pos = "bottom",   title = "If 20% of the population gets infected with Covid-19")

The problem is, on different plots tiles have different sizes so they are not good for a comparison. Here is an example, where the first chart shows 5% of the population being infected and in case of the second one number increases to 20%. I can't combine them on a single page to show the comparison as their tile sizes differ.

Do you know how to make the squares of the same size in all plots?

It is very simple. I just needed a cup of coffee to realise that you have to use the same resolution while exporting the plots. Then the squares have the same sizes.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.