Hi,

I would like to colorize certain panels in the pairs plot below with certain 
colors. How can access the panel row and column in a pairs plot to achieve this?

Cheers,

Marius


## generate data
U <- matrix(runif(4000), ncol=4)

## define panel function for colorizing the panels
mypanel <- function(x, y, ...){
    points(x, y, cex=0.5, col="blue") # giving every panel the same color is 
easy; how can I get different colors for different panels, say, gray for the 
(2,3)-panel?
}

## scatter plot matrix
pairs(U, panel=mypanel)

______________________________________________
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.

Reply via email to