coloring parallel coordinates

I've been using the parallel coordinates routine in 
visad/examples/parallel and I'm struggling with 
coloring the coordinates according to a new
variable. The code looks like:

    RealType x = RealType.getRealType("coordinate");
    RealType y = RealType.getRealType("value");
    SetType xy = new SetType(new RealTupleType(x, y));
    FunctionType ptype = new FunctionType(index, xy);
    FieldImpl pfield = new FieldImpl(ptype, index_set);
    for (int j=0; j<nrows; j++) {
      float[][] locs = new float[2][ncoords];
      for (int i=0; i<ncoords; i++) {
        locs[0][i] = i;
        locs[1][i] = samples[i][j];
      Gridded2DSet set = new Gridded2DSet(xy, locs, ncoords);
      pfield.setSample(j, set, false);
    DataReference parallel_ref = new DataReferenceImpl("parallel");
    display.addMap(new ScalarMap(x, Display.XAxis));
    display.addMap(new ScalarMap(y, Display.YAxis));

As well as samples[i][j], I have color[j], but I don't know how
to set up the data so that it will know that color[j] is the
color for the jth trace. 

Adele Cutler

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