Re: Axis labels

Hi Paul,

> Let's say I have this:
>
>   RealType valueType = new RealType("length", SI.meter, null);
>
> and I plot this vs time.  I want the label on the axis to read not
> "length", but "Distance to Wall (m)", for example.  I can't name the
> RealType "Distance to Wall (m)"...is there a way to just change the axis
> label associated with that RealType, a display name perhaps?  I've been
> up and down the API and tutorials but haven't seen anything.

Good question.  The method ScalarMap.setUnderscoreToBlank()
gets you part of the way there, but cannot help with
embedded "(" and ")" in names.  So I've added a new method
to ScalarMap:

  public void setScalarName(String name);

It will use this name, in place of the Scalar name, on axis
labels and widgets.  Also, visad/examples/Test26.java now
tests this.  These changes are now on the VisAD ftp server.

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: