1
我正在努力重新排序ggplot2圖中的y軸數字,如下面的示例。默認情況下,它只是考慮第一個數字,我希望它按照先驗次序重新排序。我會大大appreaciate任何建議。排序y軸ggplot2()
plot <- ggplot(top.OTUs.abun.melt, aes(C, test, size = SA)) +
geom_point(aes(size = SA/110), shape = 21) +
scale_size_identity(trans = "sqrt", breaks = c(100, 1000, 5000, 20000)) +
theme(panel.grid.major = element_line(linetype = 2, color = "black", size = 0.025),
axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.2)) +
scale_y_discrete(expand = c(0, 2.5))
plot2 <- plot + guides(colour = guide_legend(override.aes = list(size = 5)))
plot2
感謝Matt74,但是如果我將其更改爲數字全圖縮放它基於數字距離... – FranciscoC