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

Home » Public Forums » archive » Resizeable Graphics window
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Resizeable Graphics window [message #75199 is a reply to message #75117] Thu, 17 February 2011 13:01 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Another resizeable window question:

Do device coordinates make any sense in a resizeable window (when the size of your "device" is always changing)?

Below I give a test program that displays error bars, but first converts the data to device units. It works fine in a normal window, but if I create a resizeable window (i.e. test,/window) the lines are plotted incorrectly.

In this case, the use of device coordinates is perverse, but they are sometimes useful for "ornamental" figures. For example, setting the size of an arrow or the "hat" on an error bar to one-fiftieth of the screen size.

Thanks, --Wayne


pro test,window=window
x = indgen(10)
y = indgen(10)

; Let's do everything in device coordinates

data_low = convert_coord(x,y-0.5,/TO_DEVICE)
data_hi = convert_coord(x,y+0.5,/TO_DEVICE)
xd = data_low[0,*]
yl = data_low[1,*]
yh = data_hi[1,*]

cgplot,indgen(10),indgen(10),window=window,psym=2
if keyword_Set(window) then cgcontrol,execute=0

for i=0,9 do $
cgplots,[xd[i],xd[i]],[yl[i],yh[i] ],/device, addcmd = window


if keyword_set(window) then cgcontrol,execute=1
return
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Yesterday's Coyote Graphics Update
Next Topic: Re: working on multiple z buffers at once?

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

Current Time: Sat Oct 11 14:29:39 PDT 2025

Total time taken to generate the page: 0.08231 seconds