R中的多个箱图
答
要的箱线图添加到现有的情节,只是使用参数add=TRUE
,即:
##Some data
a = rnorm(20)
b = rnorm(20, 2, 0.3)
##The plots
boxplot(a)
boxplot(b, add=TRUE, col=2)
@csgillespie在你的答案两个箱线堆叠时,有没有什么办法让像'箱线图的结果( a,b)'多次调用'boxplot'? – 2015-10-15 14:16:28
为什么不使用'boxplot(a,b)'? – csgillespie 2015-10-15 14:19:49
@csgillespie,因为我有一个可变数量的boxplot,我不知道这个数字。 – 2015-10-15 14:21:40