有谁知道为什么情节留下了这样的盒子?

时间:2017-11-29 13:59:08

标签: r boxplot

当我改变比例时,左边的方框搞砸了。

boxplot((dados$Turbidez..ppm.~dados$Período*dados$Estado), xaxt= "n",yaxt="n",type ="b", log="y", ylim=c(0.1,1000),
        ylab = "Turbidez [ppm]",range=0,col=c("yellow","orange","red","yellow","orange","red"),
        xlab = "Regiões")
axis(2, at=10^(0:6), labels=formatC(10^(0:6),format="f", digits=0),cex.axis=0.8,las=2 )
axis(1, at = seq(2, 5, by = 3), labels=c("PB","RN"))

请看下面的方框图:

enter image description here

1 个答案:

答案 0 :(得分:0)

看看这是否适合你

boxplot(Turbidez..ppm. ~ Período*Estado, 
   data = dados[dados$Turbidez..ppm. > 0,], 
   xaxt= "n",yaxt="n",type ="b", log="y", ylim=c(0.1,1000), 
   ylab = "Turbidez [ppm]",range=0,
 col=c("yellow","orange","red","yellow","orange","red"), 
 xlab = "Regiões") 

axis(2, at=10^(0:6), labels=formatC(10^(0:6),format="f", 
   digits=0),cex.axis=0.8,las=2 ) 
axis(1, at = seq(2, 5, by = 3), labels=c("PB","RN"))