R y轴ggplot2()的排序
我正在尝试对ggplot2图形中的y轴编号重新排序(请参见下面的示例)。默认情况下,它的顺序只考虑第一个数字,我希望它按升序重新排序R y轴ggplot2()的排序,r,sorting,ggplot2,R,Sorting,Ggplot2,我正在尝试对ggplot2图形中的y轴编号重新排序(请参见下面的示例)。默认情况下,它的顺序只考虑第一个数字,我希望它按升序重新排序 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,
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
plot不,不,这不是解决方案。你不是在策划因素;你在画数字。这是打印前要执行的操作:
top.OTUs.abun.melt$test不,这不是解决方案。你不是在策划因素;你在画数字。这是打印前要执行的操作:
top.OTUs.abun.melt$test感谢Matt74,但是如果我将其更改为数字,则整个图形将根据数字距离对其进行缩放…感谢Matt74,但是如果我将其更改为数字,则整个图形将根据数字距离对其进行缩放。。。