0

Using waffle charts (ggplot2) to show proportions of the total (where the total is percentage (100)). Can I include fraction of a percent. I would also like (if possible) to set these up in a row rather than in a column as I want to put others underneath it also in a row. W3 has decimal points - these are what I would like to show. The code I am using is:

prop1avs<- c('nb'= 90, 'b'= 10)
w1 <- waffle(prop1avs, rows=10, size=0.6, 
         colors=c( "#E48B8B",  
                   "#3A9ABD" ), 
         title="Small", 
         xlab="1 square = 1/100")
prop1avm<- c('nb'= 75, 'b'= 25)
w2 <- waffle(prop1avm, rows=10, size=0.6, 
         colors=c( "#E48B8B",  
                   "#3A9ABD" ), 
         title="Medium",
         xlab="1 square = 1/100")

prop1avl<- c('nb'= 87.5, 'b'= 12.5)
w3 <- waffle(prop1avl, rows=10, size=0.6, 
         colors=c( "#E48B8B",  
                   "#3A9ABD" ), 
         title="Large",
         xlab="1 square = 1/100") 
 iron(w1, w1, w3)

I have seen somewhere that fractions of a whole are possible but I cannot figure out the code. Not very conversant with this. Apologies in advance. Thank you for any help.

desperate
  • 1
  • 1
  • It is ok I have solved this using excel and manipulating the graph a bit. So if anyone would like to do put fractions in a waffle graph it is relatively easy in excel. – desperate Oct 19 '22 at 14:55
  • Can you please then post your Excel solution as an answer to your own question to help others? – Marja van der Wind Sep 01 '23 at 14:11

0 Answers0