Re: drawing data in multiple valid range?

Hi Vladimir,

> Hello, I wonder if a "multiple selection" is possible
> in a 2D (or 3D) graphic.
> I mean, something like RangeControl.setRange(float[] range),but
> allowing more than one valid range for drawing
> (range1[range1.length]<range2[0])
> thank you.

You can do it by creating multiple fields containing the
same data, but with different range RealTypes. That is,
if the MathTypes fo the Fields are:

  ((x, y) -> range1)
  ((x, y) -> range2)
  etc

Then make ScalarMaps of range1, range2, etc to SelectRange
and select an interval for each. After you create your first
Field, you can put the same numbers in other Fields without
extra copies by:

  float[][] values = field1.getFloats(false);
  field2.setSamples(values, false);
  etc

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


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