comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » The refresh method and relative coordinate positioning
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
The refresh method and relative coordinate positioning [message #88624] Mon, 19 May 2014 12:40
Gordon Farquharson is currently offline  Gordon Farquharson
Messages: 48
Registered: December 2010
Member
Hi All

In the spirit of sharing knowledge about function graphics, I present the following knowledge gained after some quality hair pulling time.

A great trick when plotting large amounts of data with function graphics is to disable drawing in the window. For example,

w1 = window(DIMENSIONS=[800, 400])
w1.refresh, /DISABLE

im1 = image(findgen(1000,1000), CURRENT=w1, IMAGE_DIMENSIONS=[60,30], IMAGE_LOCATION=[25,25], AXIS_STYLE=2)

w1.refresh

Another nice feature of function graphics is relative coordinate positioning. For example, I can add a color bar to the right of the image using

cb1 = colorbar(TARGET=im1, ORIENTATION=1, TEXTPOS=1, POSITION=[1.025,0.,1.050, 1.], /RELATIVE)

However, disabling refresh and relative coordinate positioning do not play nicely together. For example, try

w1 = window(DIMENSIONS=[800, 400])
w1.refresh, /DISABLE

im1 = image(findgen(1000,1000), CURRENT=w1, IMAGE_DIMENSIONS=[60,30], IMAGE_LOCATION=[25,25], AXIS_STYLE=2)

cb1 = colorbar(TARGET=im1, ORIENTATION=1, TEXTPOS=1, POSITION=[1.025,0.,1.050, 1.], /RELATIVE)

w1.refresh

The result is not what one would expect (and rather frustrating if you try the latter first).

Gordon
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reading in date & time from csv file
Next Topic: continuous changing shape of plotting symbol

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:31:44 PDT 2025

Total time taken to generate the page: 0.01157 seconds