[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display widgets' scaling factors




David Fanning wrote:

> The proper thing would be to draw into the first window
> and *immediately* save the system variables.

Yep. That's the name of the game. I wrote a couple of routines
many years ago (ca 1994!) to deal with this kind of task. They're
used like this:

    plot,something
    p1 = pstore(1)     ;; Returns a "plot region ID number"

    plot,somethingelse ;; You may have more than one plot in
                       ;; a window.

    p2 = pstore(2)     ;; Hence the number "2"

    wset,some_other_window
    plot,third_thing
    p3 = pstore(1)     ;; First plot this window

    prestore,p1        ;; Restores variables + does wset
    oplot,on_top_of_first_one

    prestore,p3
    oplot,on_top_of_third_plot

etc.

To get just these files, look at 

  http://sohowww.nascom.nasa.gov/softops/cds/idl/util/display/

Get files pstore.pro, prestore.pro, pfind.pro and pconvert.pro.

The routines were designed to work with scaled (rebinned), displayed
images as well (actually, mostly!), hence the mention in the
doc's about data X/Y size etc.

I think these routines are *mostly* independent of other
routines in that S/W tree, but you may have to change

   TRIM() -> STRCOMPRESS(STRING(),??)
   SETWINDOW -> WSET

Regards,

Stein Vidar