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.

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: