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 #75195 is a reply to message #75117] Thu, 17 February 2011 13:21 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, February 17, 2011 4:01:30 PM UTC-5, wlandsman wrote:

> 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.

I should say that the problem persists even if I compute device coordinates *after* creating the resizeable graphics window. The revised code is below.

But the problem is fixed if I take David's recent suggestion and add a

WSet, cgQuery(/Current)

after the cgplot command.



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

cgplot,indgen(10),indgen(10),window=window,psym=2

; 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,*]


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: Fri Oct 10 14:18:39 PDT 2025

Total time taken to generate the page: 1.08957 seconds