All, Two questions RE scatterplot matrices produced via pairs() function:
1) Is it possible to selectively change the ylim of one of the subplots? 2) Is a key allowed? I don't seem to be able to insert a manual key. Code below: dat = data.frame(Hour= rep(c(0:3), 4), Y1 = rnorm(16,1), Y2 = rnorm(16,4),Drug = rep(c("P", "D"), each=4, 2) ) ## this works: pairs(dat, pch = 21, bg = c("red", "green3")[unclass(dat$Drug)]) ## this produces several warnings: pairs(dat, pch = 21, bg = c("red", "green3")[unclass(dat$Drug)], key = list(space = "top", text = levels(dat$Drug), lines = list(col=c("red", "green3")), columns=2) ) Cheers, David ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.