Geom_boxplot in ggplot draws parallel group box line graph
#*转变因子的一部最重要*
setwd("。。。。。")
data1 <- read.table("clipboard",header=T,sep='\t')
####转变为因子,才会显示分组
data1$dot<-as.factor(data1$dot)
data1$tw_ns<-as.factor(data1$tw_ns)
######
library(ggplot2)
p <- ggplot(data1,aes(x=tw_ns,y=error))+
geom_boxplot(aes(colour=dot ))
###colour等同于fill
p
The following is the result of whether the conversion factor