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.
Mike, If 'z' is the RealType you map to ZAxis and RGB, then construct another RealType z2 and only map it to ZAxis. Call setRange() on both ScalarMaps to ZAxis with the same range. Then construct your RealTuple with MathType (x, y, z2). Now there will be no ScalarMap to RGB relevant to your RealTuple, and you can give it any color you like in ConstantMaps passed to addReference(). Cheers, Bill Mike Charters wrote: > > i think i have everything to work now except 1 thing ... > > as i said earlier, i am adding a single point to a 3d surface plot. the > display that the 3d surface plot is on uses ScalarMaps to map > Display.RGB and Display.ZAxis to the same RealType for representing the > Z axis. > > i cannot figure out how to set the color of this point that i added to > the plot. right now it always sets the color based on where it is on > the Z axis because of the Display.RGB that is mapped to the RealType for > Z. > > I was curious if there is an easy way for me to leave the 3D surface > plot colored like it is now (based on where each point is on the Z > axis), but to have this single point always be a certain color (Green). > > thanks a lot, > > -Mike > > On Thu, 2002-08-01 at 17:57, Bill Hibbard wrote: > > Mike, > > > > > i guess now i am having a hard time figuring out where the actual x,y,z > > > values go for the point i want to add. > > > > > > do i use a FlatField(FunctionType) to create a flatfield and put the > > > samples in there by setSamples(float[3][1], false) where > > > > > > float[3][1] = { {x}, {y}, {z} } > > > > > > ? > > > > > > then i set the data of the datareference to that flatfield? > > > > No. Construct a RealTuple with the x, y, z values. There's an > > exmaple in the visad/examples/Test00.java program, and lots > > of other examples. > > > > Good luck, > > 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
visad
archives: