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