Overriding ScalarMap RGB


Greetings,

Can I override a ScalarMap with a ConstantMap?  Specifically, I have

ScalarMap altMap = new ScalarMap(alt, Display.YAxis);
ScalarMap refMap = new ScalarMap(ref, Display.XAxis);
ScalarMap rgbMap = new ScalarMap(ref, Display.RGB);

While I need the RGB for displaying a FlatField, I eventually want to add a horizontal line of solid color on top of my data using a Gridded2DSet

g2set = new Gridded2DDoubleSet(altref_tt, vals, vals[0].length);
where altref_tt = new RealTupleType(alt, ref);

I then add g2set to my DataReferenceImpl "zline_ref":

display.addReference(zline_ref, new ConstantMap[] {
new ConstantMap( 0.0, Display.Red ), new ConstantMap( 0.75, Display.Green ), new ConstantMap( 1.0, Display.Blue )
                                                          });
zline_ref.setData(g2set);

but since it contains the RealType "ref" which is mapped to RGB (as well as XAxis) I get a multicolored line instead of a solid colored line.

Am I required to create a dummy RealType mapped only to XAxis (and consquently used in my Gridded2DSet) in order to invoke the ConstantMap properties, or should the ConstantMap mapped to that DataReferenceImpl override the ScalarMap RGB? Obviously it isn't difficult to create the new RealType if necessary, I was just hoping to avoid adding an extra RealType just to create a line.

If this needs further clarification, I'd be glad to send an example.

Thanks!!

-kevin.






--
+------------------------------------------------------------+
Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN]           http://www.cimms.ou.edu/~kmanross

"My opinions are my own and not representative of CIMMS, NSSL,
NOAA or any affiliates"
+------------------------------------------------------------+


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