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

Home » Public Forums » archive » Resizeable Graphics Windows for Traditional Commands
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 #75111 is a reply to message #74494] Thu, 17 February 2011 11:57 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Thursday, February 17, 2011 2:44:06 PM UTC-5, Jeremy Bailin wrote:
> You could try doing /loadcmd instead of /addcmd, and then after the for loop execute them with
>
> cgwindow, /executecmd
>

Thanks! That works but /LOADCMD (unlike ADDCMD) is not directly available in CGPLOT. So if I want to write a program with optional output to a resizeable window it would look like this:

pro myplot,window= window
;/WINDOW - if set, then display in a resizeable graphics window

cgplot,indgen(100),window = window,psym=2
if keyword_set(window) then begin
for i=0,89 do cgwindow,'cgplots',[i,i],[i-2,i+2],/loadcmd
cgwindow,/execute
endif else for i=0,89 cgplots,[i,i],[i-2,i+2]


return
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Book is Finished!
Next Topic: Re: Code optimization

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

Current Time: Fri Oct 10 12:43:22 PDT 2025

Total time taken to generate the page: 0.15783 seconds