[Rd] Bug in hsv() (PR#712)
murdoch@stats.uwo.ca
murdoch@stats.uwo.ca
Fri, 27 Oct 2000 15:47:56 +0200 (MET DST)
Ross posted this code:
persp(x, y, z, col = cm.colors(10)[floor(9 * hgt + 1)], theta = 35)
I hadn't seen the cm.colors function before; it's very nice! I wanted
to modify it a bit to allow the start and end colors as well as the
max saturation to be specified, and I think I may have turned up a bug
in the hsv() function. Here's the evidence of the bug:
Look at the results of these two calls to hsv:
> hsv(h=0.833333333333333,s=0.5,v=1)
[1] "#FF8080"
> hsv(h=0.8333333333333333,s=0.5,v=1)
[1] "#FF80FF"
I think the 3 color components are listed as hex values in Blue,
Green, Red order here. The two calls have nearly identical parameters
(differing in hue only in the 16th decimal place), but the red
component is twice as strong in the second one.
Duncan Murdoch
--please do not edit the information below--
Version:
platform = Windows
arch = x86
os = Win32
system = x86, Win32
status =
major = 1
minor = 1.1
year = 2000
month = August
day = 15
language = R
Windows 9x 4.10 (build 1998)
Search Path:
.GlobalEnv, Autoloads, package:base
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._