[R] pairs() uses col argument for axes coloring

From: Olaf Mersmann <olaf.mersmann_at_gmail.com>
Date: Fri 08 Jul 2005 - 12:27:54 EST


Hi list,

not sure if this is the wanted behavior, but running the following code:

> version

platform i386-pc-mingw32

arch     i386
os       mingw32

system i386, mingw32
status
major 2
minor 1.1
year 2005
month 06
day 20
language R
> n <- 500
> d <- 4
> m <- matrix(runif(n*d, -1, 1), ncol=d)
> c <- hsv(apply(m, 1, function(x) {sum(x*x)/d}), 1, 1)
> pairs(m, col=c)

gives me the desired coloring of the points but also colors the axes. Looking at the source for pairs() suggests, that this is the case because col is part of the ... argument list which is passed on to localAxis (and from there to axis). Wouldn't it be more approptiate to use the same color box() uses to draw the border around each scatterplot? If yes, should I open a bug for this or how would such a feature request be handled?


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 08 12:32:42 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:22 EST