ScalarMap map = new ScalarMap((RealType) precipitation,Display.RGB);
map.setRange(min, max); // min and max of precipitation values
float table = new float[table_length];
// set color values you want in table
ColorControl control = (ColorControl) map.getControl();
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.
On Tue, 13 Jan 2004, Jay Parsons wrote:
> 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:
> 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,
> Any suggestions on how I can accomplish this type of
> color mapping?
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes