更新时间:2023-11-26 13:23:52
您的代码工作正常,但barplot从低到高排序。如果您想将酒吧从高到低排序,您必须在值
之前添加 -
标记:
Your code works fine, except that the barplot is ordered from low to high. When you want to order the bars from high to low, you will have to add a -
sign before value
:
ggplot(corr.m, aes(x = reorder(miRNA, -value), y = value, fill = variable)) +
geom_bar(stat = "identity")
给出: