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

Home » Public Forums » archive » wplot not zooming
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
wplot not zooming [message #93018] Mon, 11 April 2016 04:10 Go to next message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
Hi all,

In the following program I am not able to zoom in-out my plot:

pro pltdat4, file

Readcol,file,a,b,c,d
wplot,a,b
woplot,a,d,color=2

openw,3,'final.sh'
tt=''
Print,'Is it final?:'
Read,tt
wait,1
if (STRMATCH(tt, 'y', /FOLD_CASE) EQ 1) then begin
printf,3,format='(A,2x,A)', 'cp',file
endif
close,3
spawn, ' chmod +x final.sh'

return
end

However when I am simply doing

pro pltdat4, file
Readcol,file,a,b,c,d

wplot,a,b
woplot,a,d,color=2

return
end

I am able to zoom in-out my plot any solution???
Re: wplot not zooming [message #93025 is a reply to message #93018] Tue, 12 April 2016 09:03 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 04/11/16 07:10, Sapna Mishra wrote:
> Hi all,
>
> In the following program I am not able to zoom in-out my plot:
>
> pro pltdat4, file
>
> Readcol,file,a,b,c,d
> wplot,a,b
> woplot,a,d,color=2
>
> openw,3,'final.sh'
> tt=''
> Print,'Is it final?:'
> Read,tt
> wait,1
> if (STRMATCH(tt, 'y', /FOLD_CASE) EQ 1) then begin
> printf,3,format='(A,2x,A)', 'cp',file
> endif
> close,3
> spawn, ' chmod +x final.sh'
>
> return
> end
>
> However when I am simply doing
>
> pro pltdat4, file
> Readcol,file,a,b,c,d
>
> wplot,a,b
> woplot,a,d,color=2
>
> return
> end
>
> I am able to zoom in-out my plot any solution???

If it's the wplot/woplot that I wrote looooong ago, then I wouldn't
expect it to zoom whilst you have suspended the command line (via a read
or a wait or a get_kbrd).

Those wplot/woplot procedures weren't designed for that. They were
simply a poor-mans zoom-plot as I waited for the current function
graphics "plot" function to be implemented.

But, getting back to your code snippet, what you want to do is create
your own widget (using FG plot) but with a button that, when clicked,
outputs the command to a file or directly copies the file as you are
doing or whatever.

It's a bit of work but, if you are going to be doing this again and
again and again, worth the effort.

cheers,

paulv


p.s. OT, but if all you want is a y/n answer, I would do something like:

ans = GET_KBRD(1)
IF ( STRUPCASE(ans) EQ 'Y' ) THEN BEGIN
...blah blah
ENDIF
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Nice bridges
Next Topic: How can I make the headers of two fits files same in IDL?

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

Current Time: Wed Oct 08 13:40:06 PDT 2025

Total time taken to generate the page: 0.00503 seconds