Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: Setting Aspect Ratio while using autoscale

Hi Brian,

> I've a display that's tracking the position of several objects continually in 
> real time. The display is set to autoscale (i.e 
> display.setAlwaysAutoScale(true)). My question is...Is there some way to fix 
> the Aspect Ratio of the display, so that 1 unit along the x-axis is the same 
> length as 1 unit along the y-axis, while using auto scaling?

I'd explicitly call setRange() on the ScalarMap to YAxis
and add a ScalarMapListener to the ScalarMap to XAxis.
This way only XAxis will be auto-scaled. In the listener,
check for ScalarMapEvent.AUTO_SCALE events and make the
appropriate setRange() call to the ScalarMap for YAxis.

Good luck,
Bill


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