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

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Fri 08 Jul 2005 - 21:51:42 EST

Olaf Mersmann wrote:
> Hi list,
>
> not sure if this is the wanted behavior, but running the following code:

I'd say it's a bug.
>
>

>>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?

The best way is to get the source to pairs() (from the SVN repository in https://svn.r-project.org/R/trunk/src/library/graphics/R/pairs.R not from looking at it in R), work out what changes are needed, and submit them as a patch. You can post the patch in the R-bugs list, or just send it to me. Thanks!

Duncan Murdoch



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 21:58:42 2005

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