Re: Color table questions [message #38138] |
Sat, 21 February 2004 15:01 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Michael Wallace wrote:
> Haje Korth wrote:
>> Mike,
>> You should toss that rainbow colorbar if you do science. This color bar
>> is highly non-linear to the human eye and you tend to emphasize features
>> that a completely non-physical, but rather due to changes in the gradient
>> of the color bar it self. I did actually some research on that a while
>> ago. I found one article that illustrates the topic well:
>>
>> B. E. Rogowitz and L. A. Treinish, How to NOT lie with visualisation,
>> Computers in Physics, vol10, no 3, 1996. (Make sure you get a color copy,
>> otherwise you will not be able to verify what the authors are talking
>> about.)
>>
>> The topic says it all: Pretty pictures alone do not guarantee good
>> science! I am not trying to be arogant (not my nature), this is just a
>> simple statement that I had to find out the hard way myself.
>
> Yes! That's exactly why I want to toss out the rainbow color bar --
> because it is very non-linear to the human eye. So, simply put, I'd
> like a colorbar that is linear (or as close as reasonable) to the human
> eye but still includes several distinct colors. I only mentioned the
> rainbow color bar because it includes several colors which flow together
> nicely. What it doesn't have is linear spacing between colors.
>
> I'm asking the question because, other than simple gradients, I haven't
> completely figured out how to make not only a good looking colorbar, but
> one that's also linear. I would have thought that someone else out
> there might also want to do this...
>
> As for the article you mention, that should be on the reading list of
> anyone who does science data analysis with colors. Here's an on-line
> version:
> http://www.research.ibm.com/dx/proceedings/pravda/truevis.ht m
>
> Mike
Dear Mike,
we have some nice colortables in our library,
for example: ct_blue_green_yellow_red
You find them in the library catalogue.
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html
idl_work_libraries.htm
Please have look at the following site too:
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
regards
Reimar
|
|
|
Re: Color table questions [message #38156 is a reply to message #38138] |
Fri, 20 February 2004 13:17  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <103cnnc4ku4pg20@corp.supernews.com>,
Michael Wallace <mwallace.removethismunge@swri.edu.invalid> wrote:
> I'm asking the question because, other than simple gradients, I haven't
> completely figured out how to make not only a good looking colorbar, but
> one that's also linear. I would have thought that someone else out
> there might also want to do this...
Here is a simple routine to change a section of the color table
between indices cmin and cmax to a blue-to-white-to-red ramp.
I use it for data where I have 'negative' regions (blue) and
'positive' regions (red). Values near zero are white.
The trick is to work in HSV space (or HLS space, if you prefer).
The rest of the color table is unchanged.
Ken Bowman
PRO BLUE_WHITE_RED, cmin, cmax
;NAME:
; BLUE_WHITE_RED
;PURPOSE:
; This procedure sets a portion of the color scale to blue-white-red.
;CATEGORY:
; Graphics and display.
;CALLING SEQUENCE:
; BLUE_WHITE_RED, cmin, cmax
;INPUT:
; cmin : minimum index of color table to use.
; cmax : maximum index of color table to use.
;KEYWORDS:
; None.
;OUTPUT:
; Changes the IDL color table.
;MODIFICATION HISTORY:
; KPB, 1997-10-01. Updated 2004-02-20.
COMPILE_OPT IDL2 ;Set compile options
nc = cmax - cmin + 1 ;Number of colors
cmid = (cmin + cmax)/2 ;Midpoint of color scale
TVLCT, r, g, b, /GET ;Get current color table
COLOR_CONVERT, r, g, b, h, s, v, /RGB_HSV ;Convert to hsv
IF(nc GT N_ELEMENTS(r)) THEN $
MESSAGE, 'Available color table of ', N_ELEMENTS(r), 'colors is insufficient for ', nc, ' colors.'
h[cmin :cmid] = 240.0 ;Lower half blue
h[cmid+1:cmax] = 0.0 ;Upper half red
s[cmin :cmid] = MAKEN(1.0, 0.0, cmid - cmin + 1) ;Fade to white at middle
s[cmid+1:cmax] = MAKEN(0.0, 1.0, cmax - cmid ) ;Fade from white at middle
v[cmin :cmax] = 1.0 ;Set the value
TVLCT, h, s, v, /HSV ;Load color scale
END
|
|
|
Re: Color table questions [message #38157 is a reply to message #38156] |
Fri, 20 February 2004 12:28  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Mike,
I see you are up to speed. Thanks for the web page info. That will be a good
link also for lazy people trying to avoid a trip to the library. It can't
get easier than having it served on a silver plate. :-) What I have done in
the past is try to stick to one or two colors. One color can of course be
just grey shading. I use two colors for bimodal data sets using white the
transition color (zero). Also I make use of step functions rather than
smooth gradients. Once it comes of the printers, I can never distinguish 256
shades anyway.
Greetings,
Haje
--
"Michael Wallace" <mwallace.removethismunge@swri.edu.invalid> wrote in
message news:103cnnc4ku4pg20@corp.supernews.com...
> Haje Korth wrote:
>> Mike,
>> You should toss that rainbow colorbar if you do science. This color bar
is
>> highly non-linear to the human eye and you tend to emphasize features
that a
>> completely non-physical, but rather due to changes in the gradient of
the
>> color bar it self. I did actually some research on that a while ago. I
found
>> one article that illustrates the topic well:
>>
>> B. E. Rogowitz and L. A. Treinish, How to NOT lie with visualisation,
>> Computers in Physics, vol10, no 3, 1996. (Make sure you get a color
copy,
>> otherwise you will not be able to verify what the authors are talking
>> about.)
>>
>> The topic says it all: Pretty pictures alone do not guarantee good
science!
>> I am not trying to be arogant (not my nature), this is just a simple
>> statement that I had to find out the hard way myself.
>
> Yes! That's exactly why I want to toss out the rainbow color bar --
> because it is very non-linear to the human eye. So, simply put, I'd
> like a colorbar that is linear (or as close as reasonable) to the human
> eye but still includes several distinct colors. I only mentioned the
> rainbow color bar because it includes several colors which flow together
> nicely. What it doesn't have is linear spacing between colors.
>
> I'm asking the question because, other than simple gradients, I haven't
> completely figured out how to make not only a good looking colorbar, but
> one that's also linear. I would have thought that someone else out
> there might also want to do this...
>
> As for the article you mention, that should be on the reading list of
> anyone who does science data analysis with colors. Here's an on-line
> version:
> http://www.research.ibm.com/dx/proceedings/pravda/truevis.ht m
>
> Mike
|
|
|
Re: Color table questions [message #38159 is a reply to message #38157] |
Fri, 20 February 2004 11:24  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
Haje Korth wrote:
> Mike,
> You should toss that rainbow colorbar if you do science. This color bar is
> highly non-linear to the human eye and you tend to emphasize features that a
> completely non-physical, but rather due to changes in the gradient of the
> color bar it self. I did actually some research on that a while ago. I found
> one article that illustrates the topic well:
>
> B. E. Rogowitz and L. A. Treinish, How to NOT lie with visualisation,
> Computers in Physics, vol10, no 3, 1996. (Make sure you get a color copy,
> otherwise you will not be able to verify what the authors are talking
> about.)
>
> The topic says it all: Pretty pictures alone do not guarantee good science!
> I am not trying to be arogant (not my nature), this is just a simple
> statement that I had to find out the hard way myself.
Yes! That's exactly why I want to toss out the rainbow color bar --
because it is very non-linear to the human eye. So, simply put, I'd
like a colorbar that is linear (or as close as reasonable) to the human
eye but still includes several distinct colors. I only mentioned the
rainbow color bar because it includes several colors which flow together
nicely. What it doesn't have is linear spacing between colors.
I'm asking the question because, other than simple gradients, I haven't
completely figured out how to make not only a good looking colorbar, but
one that's also linear. I would have thought that someone else out
there might also want to do this...
As for the article you mention, that should be on the reading list of
anyone who does science data analysis with colors. Here's an on-line
version:
http://www.research.ibm.com/dx/proceedings/pravda/truevis.ht m
Mike
|
|
|
Re: Color table questions [message #38160 is a reply to message #38159] |
Fri, 20 February 2004 10:23  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Mike,
You should toss that rainbow colorbar if you do science. This color bar is
highly non-linear to the human eye and you tend to emphasize features that a
completely non-physical, but rather due to changes in the gradient of the
color bar it self. I did actually some research on that a while ago. I found
one article that illustrates the topic well:
B. E. Rogowitz and L. A. Treinish, How to NOT lie with visualisation,
Computers in Physics, vol10, no 3, 1996. (Make sure you get a color copy,
otherwise you will not be able to verify what the authors are talking
about.)
The topic says it all: Pretty pictures alone do not guarantee good science!
I am not trying to be arogant (not my nature), this is just a simple
statement that I had to find out the hard way myself.
Greetings,
Haje
"Michael Wallace" <mwallace.removethismunge@swri.edu.invalid> wrote in
message news:103ccjfi5gp198a@corp.supernews.com...
> A color table question for the color gurus....
>
> I want to use a color table like rainbow + white, except I need the
> colors to be spaced more evenly. The green section is very large and
> the yellow section is very small. People around here use that color
> table a lot because there are several different colors and there is a
> clean progression between colors, but I'm afraid that such a huge green
> section and such a small yellow section may be 'hiding' some of the
> nuances of my data. Of course, no color table is perfect, but I think
> it's possible to do better than what IDL provides. I'd like a smooth
> violet -> blue -> green -> yellow -> red progression but where each of
> the colors occupy approximately the same range. Anyone know of where I
> could find such a thing?
>
> -MikeW
|
|
|