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

Home » Public Forums » archive » Pan/Zoom Line Plots with Coyote Graphics
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: Pan/Zoom Line Plots with Coyote Graphics [message #80222 is a reply to message #80153] Mon, 21 May 2012 14:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> At my new job, we had a need to be able to zoom into a
> lot of data very quickly and then pan around the data
> to see what points are in the immediate vicinity.

I modified this Zoom/Pan program this morning to add
more functionality. There is now a multiple REDO functionality
to go along with the multiple UNDO functionality that was
previously in the program.

Also, I added the ability to "adjust" the Y range of the
zoomed-in plot, to accommodate the minimum and maximum
data values of the data in the X range view of the data.
Combined with the UNDO/REDO, this gives you a way to zoom
into the data very closely, but to back out to see an "overview"
of the actual data in the view's X range, then UNDO that to return to
your close-in view of the data itself. The data adjustment,
UNDO, and REDO can be done with buttons in the pull-down menu
or by using accelerator keys (very fast!!). We use this
to good effect with lidar data.

I also realized that people might want to use this
functionality in their own widget programs. (So you could
look at multiple files, for example.) So, I have added a
PARENT keyword that allows you to specify your own parent
widget for this display window. Essentially, this program
becomes an interactive Zoom/Pan line plot window in your
own program. (It is a compound widget object, if you like.)
Here is a very simplified program that demonstrates how to
do this.

PRO Test
tlb = Widget_Base(Title='My Program')
cgZPlot, cgDemodata(1), PSYM=2, Color='dodger blue', Parent=tlb
Widget_Control, tlb, /Realize
Widget_Control, 'myprogram', tlb, /NoBlock
END

You can download the updated program here:

http://www.idlcoyote.com/programs/cgzplot.pro

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Type of array to store large numbers
Next Topic: Re: ps_start and color

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

Current Time: Fri Oct 10 17:33:14 PDT 2025

Total time taken to generate the page: 0.31662 seconds