Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
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"); parallel_ref.setData(pfield); 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
visad
archives: