Re: Reversing Axes in 2D plots

> You can reverse an axis by using the setRange method of the ScalarMap to
> that axis.
> 
> ScalarMap sm = new ScalarMap(myRangeType, Display.YAxis);
> myDisplay.addMap(sm);
> ...
> double[] range = sm.getRange();
> sm.setRange(range[1], range[0]);

Or, if you have some desired range of pressures, you can just do:

  ScalarMap sm = new ScalarMap(myRangeType, Display.YAxis);
  myDisplay.addMap(sm);
  sm.setRange(1012.0, 100.0); // or whatever

Cheers,
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


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