Re: changing display units

Hi Stu,

> If you have a FlatField with temperature in Kelvin units
> and want to display it in Celcius or Fahrenheit
> is there an easy way to do so?  The contour labels should
> be in the new untis, for example. And axes units.

This is something the BOM asked me to do so thanks for the
reminder.  You can override the default Units by a new
method of ScalarMap:

  public void setOverrideUnit(Unit unit) throws VisADException;

The unit must be convertible with the default Unit of the
ScalarMap's RealType, and this method should be called before
any data are displayed.

This will affect the ScalarMap's setRange(), getRange()
getScale() and makeScale() methods.

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: