1

I would like to 'merge' these two waffle charts:

waffle(pct, rows = 5, use_glyph = "angle-left", glyph_size = 9, 
   colors = c("grey", adjustcolor("green", alpha.f = 0.0)),
   title = "Motoraccidents in bends",
   xlab = "1 bike = 1% of all motorcycle accidents",
   legend_pos = "bottom") 
waffle(pct, rows = 5, use_glyph = "angle-right", glyph_size = 9, 
   #colors = c("White", "darkred"),
   colors = c(adjustcolor("green", alpha.f = 0.0), "darkred"),
   title = "Motoraccidents in bends",
   xlab = "1 bike = 1% of all motorcycle accidents",
   legend_pos = "bottom") 

Any ideas?

Marcus Campbell
  • 2,746
  • 4
  • 22
  • 36
pkalmijn
  • 21
  • 4

1 Answers1

1

As I could not find anything in the documentation and also on the internet, I tried around - and found the answer: just make a vector for the use-glyph function.

waffle(pct, rows = 5, use_glyph = c("arrow-left", "arrow-right"), glyph_size = 9, 
   colors = c("red", "darkred"),
   title = "Motoraccidents in bends",
   xlab = "1 glyph = 1% of motorcycle accidents in bends",
   legend_pos = "bottom") 
pkalmijn
  • 21
  • 4