NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: color control

Hi Jay,

 After your:

  ScalarMap map = new  ScalarMap((RealType) precipitation,Display.RGB);

do:

  map.setRange(min, max); // min and max of precipitation values
  float[][] table = new float[3][table_length];
  // set color values you want in table
  ColorControl control = (ColorControl) map.getControl();
  control.setTable(table);

The 3 components of table are red, green and blue. You can
set the color values you want for various precipitation
values. You'll probably need to experiment a bit to get
the look you want.

Good luck,
Bill

On Tue, 13 Jan 2004, Jay Parsons wrote:

> VisADers,
>
> I am using VisAD to display water volume over a
> terrain and I am trying to get more control over the
> colors used to display water volume.
>
> Picture of my current state:
> http://www.swt.edu/~jp1120/waterflowvis/WATERFLOW2.JPG
>
> I am using a scalar map for water volume.
>  new  ScalarMap((RealType) precipitation,Display.RGB);
>
> But I would really like to be able to map specific
> values and ranges to specific colors.  0 to green, .01
> to 1.0 mapped to light blue, 1.01 - 5.0 to dark blue,
> etc...
>
>
> Any suggestions on how I can accomplish this type of
> color mapping?
>
> -Jay
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>


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