Re: reAutoScale

Hi Doug and Mathias,

> I have a simple time series plot with some field (e.g. temperature)
> plotted vs. time for several surface stations. Auto scaling does the
> right thing when I add data to the Display and I seem to recall it doing
> the right thing when I remove DataReferences from the Display. However,
> now I am using the DataRenderer.toggle method to turn off my data. Even
> if I call the Display's reAutoScale method, it doesn't auto scale. 
> 
> Is this a bug? Should calling DataRenderer.toggle( false ) cause the
> Display to reAutoScale? Or should a call to reAutoScale at least look at
> the toggled state before using the data for auto scaling?

No, the reAutoScale() method only says to auto-scale the
next time data are transformed into geometry. Follow that
call by a call to DisplayImpl.reDisplayAll() to trigger the
transform.

> On a related note, I also recall that calling ScalarMap.setRange
> effectively turns off the auto scaling. Is there a way to turn auto
> scaling back on?

That's a good idea. It would require a new method in ScalarMap,
perhaps in the next release.

Mathias said:

> So the autoscaling does it's work on the first setting of the
> data via FlatField.setSamples( ... ). But if I later wanted to
> change the data via a new call to setSamples() no rescaling was
> done.

That's right: the DisplayImpl does not re-autoscale every time
data values change - VisAD would be slow if it did. But you can
explicitly ask for it by calling DisplayImpl.reAutoScale() before
you call setSamples().

Cheers,
Bill


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