想把boxplot放在pairs的upper panel,但是不成功。请大家帮忙看看!谢谢!
panel.boxplot = function(x,y, ...) {
usr = par("usr")
on.exit(par(usr))
boxplot(x, y, col =1:2, horizontal = TRUE, notch = TRUE, varwidth = TRUE, plot=TRUE, add=TRUE)
}
pairs(iris[1:4], upper.panel = panel.boxplot, pch = 20,
oma = c(2, 2, 2, 2), lower.panel = , diag.panel = )