[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xwindow question

Martin Schultz (mgs@io.harvard.edu) writes:

> Seems like the author isn't aware of his genius? ;-) 

You obviously haven't had a recent conversation with my
wife, thank goodness. :-(

> Although I
> still haven't XWINDOW embedded in all my programs (I know, I should),
> it seems to me that you can specify any routine to be executed
> upon a "redraw" event, i.e. also when you create a postscript
> file. So, if you write a simple procedure like
>    pro extplot,x,y,_EXTRA=e
>       ; do the plot
>       plot,x,y,_EXTRA=e
>       ; do something else
>       xyouts,0.5,0.98,'Grand title',/NORM,align=0.5
>       return
>    end
> Then you pass 'extplot' instead of 'plot' to xwindow, and you should
> be able to create a postscript file as you like.

Absolutely, XWINDOW can do this. In fact, this is *exactly*
what I had in mind when I wrote the program. But what some
people want to do is display something with XWINDOW, then
issue more graphics commands at the IDL command line and
see the results in the XWINDOW display window. 

Although this capability was absolutely NOT what I had in
mind, enough folks pestered me (but NOT you, Martin!) that
I added a WID keyword so you could get the window index 
number of the display window back from XWINDOW. Then you
could put whatever you like into it. But, of course, 
XWINDOW itself knows absolutely nothing about what you
are doing and I have NEVER recommended this way of working
with the program.

What I think someone (not me) should write, is a generic
graphics object that could work in a way that is analogous
to XWINDOW. That is, you could pass it the graphics command 
to execute. But with an object, of course, you could easily
pass it as many commands as you like, and it could execute
*all* of them. The object wouldn't even have to know 
ahead of time what it was executing! Can you imagine
the possibilities!

Oh, man, I might even write the darn thing myself. But
I'd have to charge folks for it. Either that, or you would 
have to listen to *that* conversation from my wife. :-(



P.S. Let's just say my LinkedList object would
be *perfect* for storing the graphics commands. :-)

David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155