最佳答案
qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(gear), order = -gear)
关于r - 如何更改 ggplot2 条形图中的堆叠顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2427742/
最佳答案
qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(gear), order = -gear)
关于r - 如何更改 ggplot2 条形图中的堆叠顺序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2427742/
相关文章:
R:如何从列表的每个内部元素中删除第一个元素而不将其转换为矩阵?
基于 adjustmentOHLC() 和 Ad() 的 R Quantmod 年度返回差异
r - 如何使用数据表获取 R 中自上次日期(滞后)以来的时间差?
r - ggplot2 绘图 : Change Text in Case it Exceeds the Plot Window when Exporting as PNG
r - 将arrangeGrob存储到对象,不创建可打印对象
R 和 ggplot2 : how do I connect the dots for a line chart and polar coordinates?