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.

Reversing Axes in 2D plots

Hello, all.

I have a 2D data set (pressure versus temperature), which I wish to display with pressure on the Y-Axis. Using the obvious

            myDisplay.addMap(new ScalarMap(myRangeType, Display.XAxis));
myDisplay.addMap(new ScalarMap((RealType), myDomainType.getComponent(0),Display.YAxis));

produces almost what I want: at the origin, the pressure coordinate has the lowest value in the data set, and at the top, it has the highest.

This is certainly the expected behavior for a generic data set, but it is a trifle unphysical in reference to an atmosphere, where the highest pressures occur at the "lowest" point.

Is there any obvious way to invert the scales of a scalar map? I didn't see one in the javadoc, but that doesn't mean it isn't there.

        Edward


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