[Sciviews-commits] r381 - in pkg/SciViews: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 26 09:22:23 CEST 2011


Author: phgrosjean
Date: 2011-07-26 09:22:23 +0200 (Tue, 26 Jul 2011)
New Revision: 381

Modified:
   pkg/SciViews/DESCRIPTION
   pkg/SciViews/NEWS
   pkg/SciViews/R/colors.R
   pkg/SciViews/man/colors.Rd
Log:
gamma argument eliminated from xxx.colors() functions in SciViews (the equivalent argument in hsv() is dropped in R 2.14.0

Modified: pkg/SciViews/DESCRIPTION
===================================================================
--- pkg/SciViews/DESCRIPTION	2011-07-18 15:45:13 UTC (rev 380)
+++ pkg/SciViews/DESCRIPTION	2011-07-26 07:22:23 UTC (rev 381)
@@ -5,8 +5,8 @@
 Depends: R (>= 2.6.0), stats, grDevices, graphics, MASS
 Enhances: base, stats
 Description: Functions to install SciViews additions to R, and more (various) tools
-Version: 0.9-3
-Date: 2010-09-26
+Version: 0.9-4
+Date: 2011-07-26
 Author: Philippe Grosjean
 Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
 License: GPL-2

Modified: pkg/SciViews/NEWS
===================================================================
--- pkg/SciViews/NEWS	2011-07-18 15:45:13 UTC (rev 380)
+++ pkg/SciViews/NEWS	2011-07-26 07:22:23 UTC (rev 381)
@@ -1,5 +1,12 @@
 = SciViews News
 
+== SciViews version 0.9-4
+
+* The gamma argument in hsv() function disappears in R 2.14.0. As a consequence,
+  the same gamma argument is dropped from rwb.colors(), ryg.colors() and
+  cwm.colors().
+
+
 == SciViews version 0.9-3
 
 * A bug in svd.pca() subfunction of pcomp.default() was corrected.

Modified: pkg/SciViews/R/colors.R
===================================================================
--- pkg/SciViews/R/colors.R	2011-07-18 15:45:13 UTC (rev 380)
+++ pkg/SciViews/R/colors.R	2011-07-26 07:22:23 UTC (rev 381)
@@ -1,33 +1,32 @@
 ## We often need a red-white-blue color ramp, or a red-yellow-green one
 ## So, define rwb.colors() and ryg.colors()
-rwb.colors <- function (n, alpha = 1, gamma = 1, s = 0.9, v = 0.9)
+rwb.colors <- function (n, alpha = 1, s = 0.9, v = 0.9)
 {
 	if ((n <- as.integer(n[1L])) <= 0) return(character(0L))
 	## Define the initial (red) and final (blue) colors with white in between
-	cols <- c(hsv(0, s, v, gamma, alpha),   # Red
-			  hsv(0, 0, v, gamma, alpha),   # White
-			  hsv(2/3, s, v, gamma, alpha)) # Blue
+	cols <- c(hsv(0, s, v, alpha = alpha),   # Red
+			  hsv(0, 0, v, alpha = alpha),   # White
+			  hsv(2/3, s, v, alpha = alpha)) # Blue
 	## Use a color ramp from red to white to blue
 	return(colorRampPalette(cols)(n))
 }
 
 ## Red-yellow-green palette (take care for color-blind people here)!
-ryg.colors <- function (n, alpha = 1, gamma = 1, s = 0.9, v = 0.9)
+ryg.colors <- function (n, alpha = 1, s = 0.9, v = 0.9)
 {
 	## This is essentially rainbow(), but going from 0 (red) to 2/6 (green)
-	return(rainbow(n, s = s, v = v, start = 0, end = 2/6, gamma = gamma,
-		alpha = alpha))
+	return(rainbow(n, s = s, v = v, start = 0, end = 2/6, alpha = alpha))
 }
 
-## Slighly different than cm.colors(), allowing for s, v and gamma!
+## Slighly different than cm.colors(), allowing for s and v!
 ## Produce probably better results on a CMYK device (color printer)?
-cwm.colors <- function (n, alpha = 1, gamma = 1, s = 0.9, v = 0.9)
+cwm.colors <- function (n, alpha = 1, s = 0.9, v = 0.9)
 {
 	if ((n <- as.integer(n[1L])) <= 0) return(character(0L))
 	## Define the initial (red) and final (blue) colors with white in between
-	cols <- c(hsv(1/2, s, v, gamma, alpha), # Cyan
-			  hsv(0, 0, v, gamma, alpha),   # White
-			  hsv(5/6, s, v, gamma, alpha)) # Magenta
+	cols <- c(hsv(1/2, s, v, alpha = alpha), # Cyan
+			  hsv(0, 0, v, alpha = alpha),   # White
+			  hsv(5/6, s, v, alpha = alpha)) # Magenta
 	## Use a color ramp from red to white to blue
 	return(colorRampPalette(cols)(n))
 }

Modified: pkg/SciViews/man/colors.Rd
===================================================================
--- pkg/SciViews/man/colors.Rd	2011-07-18 15:45:13 UTC (rev 380)
+++ pkg/SciViews/man/colors.Rd	2011-07-26 07:22:23 UTC (rev 381)
@@ -10,17 +10,15 @@
 }
 
 \usage{
-cwm.colors(n, alpha = 1, gamma = 1, s = 0.9, v = 0.9)
-rwb.colors(n, alpha = 1, gamma = 1, s = 0.9, v = 0.9)
-ryg.colors(n, alpha = 1, gamma = 1, s = 0.9, v = 0.9)
+cwm.colors(n, alpha = 1, s = 0.9, v = 0.9)
+rwb.colors(n, alpha = 1, s = 0.9, v = 0.9)
+ryg.colors(n, alpha = 1, s = 0.9, v = 0.9)
 }
 
 \arguments{
   \item{n}{ the number of colors (>= 1) to be in the palette. }
   \item{alpha}{ the alpha transparency, a number in [0, 1], see argument
     \code{alpha} in \code{\link{hsv}}. }
-  \item{gamma}{ the gamma correction, see argument \code{gamma} in
-    \code{\link{hsv}}. }
   \item{s}{ the 'saturation' to be used to complete the HSV color descriptions. }
   \item{v}{ the 'value' to use for the HSV color descriptions. }
 }



More information about the Sciviews-commits mailing list