use of Display.Red color control

I am working through the new Java Tutorial by Ugo Tadei, and
find it very helpful for a new user of VisAD. The tutorial is online at
http://www.ssec.wisc.edu/~billh/tutorial/index.html .

I have some questions about color control in Section 3.4
(http://www.ssec.wisc.edu/~billh/tutorial/s3/Section3.html )

The example program p3_04 displays 3 different quantitites on the same display
with three color maps:

    tempMap = new ScalarMap( temperature,  Display.Red );
    pressMap = new ScalarMap( pressure,  Display.Green );
    precipMap = new ScalarMap( precipitation,  Display.Blue );
    display.addMap( tempMap );
    display.addMap( pressMap );
    display.addMap( precipMap );

Works fine. The temperature (red) has a maximum at the top and a 
minimum at the bottom of the display, as expected by the data values supplied.

However, if you just want to see temerpature as shades of red,
and you comment out display.addMap for the pressMap and precipMap, leaving only
the tempMap ("Display.Red") you see only white to cyan. 
Why does a display control called "Display.Red" make cyan?

If I switch Display.Red to Display.Cyan then red appears.

So using Display.Red gives red where desired - but only if 
other colors are displayed.

Likewise using only precipMap shows white to yellow, with white
is where blue is expected.

Is this because there are other Maps (green and blue), which are
"implicitly" created and added to the display. 

How do you display temperature as shades of red using Display.Red?
Using Display.Cyan seems counter-intuitive.

Stu Wier

----------
Stuart Wier                           UCAR Unidata Program Center
wier@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8659                              Boulder, CO 80307
Unidata Home Page                     http://www.unidata.ucar.edu/

  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: