1

我想“合并”这两个华夫饼图:

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") 

有任何想法吗?

4

1 回答 1

1

因为我在文档和互联网上都找不到任何东西,所以我尝试了 - 并找到了答案:只需为 use-glyph 函数制作一个向量。

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") 
于 2020-05-27T10:57:32.643 回答