[Distr-commits] r585 - branches/distr-2.2/pkg

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 10 20:59:06 CEST 2009


Author: ruckdeschel
Date: 2009-09-10 20:59:06 +0200 (Thu, 10 Sep 2009)
New Revision: 585

Modified:
   branches/distr-2.2/pkg/qqplot.R
Log:
yet another fix for multiple colors

Modified: branches/distr-2.2/pkg/qqplot.R
===================================================================
--- branches/distr-2.2/pkg/qqplot.R	2009-09-10 18:45:19 UTC (rev 584)
+++ branches/distr-2.2/pkg/qqplot.R	2009-09-10 18:59:06 UTC (rev 585)
@@ -206,7 +206,10 @@
 }
 
 .fadeColor <- function(col,x){
- colx <- colorRamp(c("white",col))(x)
+ ind <- seq(along=x)
+ col <- .makeLenAndOrder(col,ind)
+ colx <- t(sapply(ind,function(i) colorRamp(c("white",col[i]))(x[i])))
+ print(colx)
  colv2col <- function(colvec)
    rgb(red = colvec[1], green = colvec[2], blue = colvec[3], maxColorValue = 255)
  apply(colx,1,function(x) colv2col(x))



More information about the Distr-commits mailing list