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 Gridded3DSets

On Sun, 2 Mar 2003, Jay Patel wrote:

> I thought I had solved the problem but i dont seem to get the colors. I mean
> I can see the Gridded3DSet changes color to some grey color but not to red,
> green or blue. I have also added the scalarmaps:
>  display.addMap(new ScalarMap(r, Display.Red));
>  display.addMap(new ScalarMap(g, Display.Green));
>  display.addMap(new ScalarMap(b, Display.Blue));
> > I solved it by doing the following:
> >
> > Data[] trial = {new Gridded3DSet(xyz_right, samples1,6),
> >          new Real(r,1),
> >          new Real(g,0),
> >          new Real(b,0)};
> >   TupleIface trialtuple = new Tuple(right_tuple,trial);
> > image_sequence_right.setSample(i,trialtuple);
>
> Can anyone help?

Try calling setRange(0.0, 1.0) for your three ScalarMaps
of r, g and b. If that doesn't help, then please send me
a small test program demonstrating the problem.

Good luck,
Bill


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