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
Pan/Zoom Line Plots with Coyote Graphics [message #80153] Thu, 17 May 2012 08:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

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.

Python has a rudimentary capability like we wanted, but
it's just a bit clunky and slow. You can pan IDL 8.1
graphics (sometimes even when you don't want to!), but
you can easily pan your plot off the face of the Earth
and good luck writing or modifying one of *those* programs!

So, to make a long story short, I had to un-retire for
a day to write what we wanted in Coyote Graphics. It's
pretty darn slick, even if I say so myself. :-)

I have added it to the Coyote Library this morning:

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

It is written as an object (although called like a procedure),
and is a subclass of a new cgGraphicsKeywords object which
handles graphics keywords. You will need this program, too.

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

Basically, the program is an interactive wrapper to cgPlot
and is called *exactly* like cgPlot, with all of cgPlot's
keywords, etc.

IDL> cgZPlot, cgDemodata(1), PSym=2, Color='red'

The operations are simple. Zoom with the LEFT mouse button and
pan with the RIGHT mouse button.

If you click inside the plot with the LEFT mouse button, you can
draw a rubberband zoom box to make your initial zoom selection.
You can tweak your zoom by clicking the LEFT mouse button outside
of the plot boundaries. Clicking at the top or bottom of the plot
will zoom in or out, respectively, of the X axis. Clicking to the
right or left of the plot will do the same with the Y axis. To
restore the plot to its original dimensions, simply click and
release inside the plot without moving the mouse. Complete
directions are in the documentation.

If a plot is zoomed, you can use the RIGHT mouse button to pan the
plot in the graphics window.

Panning and zooming are incredibly fast and smooth, even with a full
size window on my display.

Since I am retired, I figure I am done holding everyone's hand, so
if you want nice looking file output, you will have to install
ImageMagick and GhostScript (for PDF output). I figure most
Coyote Library users will have these installed by now. If not,
there is no hope for them anyway. :-)

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: Wed Oct 08 19:15:27 PDT 2025

Total time taken to generate the page: 0.00500 seconds