是的,或者你可以使用。
lmts <- range(x1,x2,y1,y2)
par(mfrow = c(1, 2))
boxplot(x1, x2, ylim=lmts,names=c("x1","x2"),xlab="x")
boxplot(y1, y2, ylim=lmts,names=c("y1","y2"),xlab="y")

在不基于评论的完整方面......
> quantile(c(2,3,4), type=1)
0% 25% 50% 75% 100%
2 2 3 4 4
> quantile(c(2,3,4), type=2)
0% 25% 50% 75% 100%
2 2 3 4 4
> quantile(c(2,3,4), type=3)
0% 25% 50% 75% 100%
2 2 3 3 4
> quantile(c(2,3,4), type=4)
0% 25% 50% 75% 100%
2.00 2.00 2.50 3.25 4.00
> quantile(c(2,3,4), type=5)
0% 25% 50% 75% 100%
2.00 2.25 3.00 3.75 4.00
> quantile(c(2,3,4), type=6)
0% 25% 50% 75% 100%
2 2 3 4 4
> quantile(c(2,3,4), type=7)
0% 25% 50% 75% 100%
2.0 2.5 3.0 3.5 4.0
> quantile(c(2,3,4), type=8)
0% 25% 50% 75% 100%
2.000000 2.166667 3.000000 3.833333 4.000000
> quantile(c(2,3,4), type=9)
0% 25% 50% 75% 100%
2.0000 2.1875 3.0000 3.8125 4.0000