trier2006 发表于 2012-5-8 08:41 
boxplot后面
请问是这么加:
png("china.png",width=1260,height=660)
boxplot(cpi[,2:33],rug)
dev.off()
还是这么加:
png("china.png",width=1260,height=660)
boxplot(cpi[,2:33]);rug
dev.off()
第一种情况下出来的图形还是原来的样子,没什么变化。
第二种情况下图形也没变,出来一些错误提示:
> png("china.png",width=1260,height=660)
> boxplot(cpi[,2:33]);rug
function (x, ticksize = 0.03, side = 1, lwd = 0.5, col = par("fg"),
quiet = getOption("warn") < 0, ...)
{
x <- as.vector(x)
ok <- is.finite(x)
x <- x[ok]
if (!quiet) {
u <- par("usr")
u <- if (side%%2 == 1) {
if (par("xlog"))
10^u[1L:2]
else u[1L:2]
}
else {
if (par("ylog"))
10^u[3:4]
else u[3:4]
}
if (any(x < u[1L] | x > u[2L]))
warning("some values will be clipped")
}
Axis(side = side, at = x, labels = FALSE, lwd = 0, lwd.ticks = lwd,
col.ticks = col, tck = ticksize, ...)
}
<bytecode: 0x024fc15c>
<environment: namespace:graphics>
> dev.off()
null device
1
>