g + geom_bar(aes(fill = drv), position = 'fill') 百分比柱状图 分组柱状图 p1 <- g + geom_bar(aes(fill = drv), position = position_dodge()) p2 <- g + geom_bar(aes(fill = drv), position = position_dodge2()) plot_grid(p1, p2, labels = LETTERS[1:2], ncol = 2) ...
首先,这里描述了geom_col版本:Is it possible to have variable width of bars in geom_col?
首先,这里描述了geom_col版本:Is it possible to have variable width of bars in geom_col?