我正在使用beeswarm绘制我的数据。
d<-data.frame(Cond=c(WT,WT,KO,KO),Count=c(1,2,3,4))
beeswarm(Count ~ Cond, data = d)这会产生以下图像。

如何手动指定x轴,以便WT先于KO?
发布于 2015-09-30 10:41:39
d<-data.frame(Cond=c("WT","WT","KO","KO"),Count=c(1,2,3,4))
#turn into a factor with manual specification of levels
d$Cond <- factor(d$Cond,levels=c("WT","KO"))
#plot
beeswarm(Count ~ Cond, data = d)

发布于 2015-09-30 10:42:00
是关于那个here的
d<-data.frame(Cond=c('WT', 'WT', 'KO', 'KO'),Count=c(1,2,3,4))
library(beeswarm)
beeswarm(Count ~ Cond, data = d)
f <- ordered(d$Cond, levels = c("WT", "KO"))
beeswarm(Count ~ f, data = d)https://stackoverflow.com/questions/32863749
复制相似问题