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

Home » Public Forums » archive » Re: xwindow question
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
Re: xwindow question [message #16164] Thu, 01 July 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
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. :-(

Cheers,

David

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
Re: xwindow question [message #16165 is a reply to message #16164] Thu, 01 July 1999 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Nando Iavarone wrote:
>
> Hi all,
> I'm using the david fanning's "xwindow" procedure.
> I used it with the keyword "wid" to make other oeparations
> on the display window.
> I need to have the PS output of currently display and not
> of the starting display.
>
> Has anyone just modified the procedure to do that?
>
> Thank you.
>
>

Seems like the author isn't aware of his genius? ;-) 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.

Hope this helps,
Martin

--

|||||||||||||||\\\\\\\\\\\\\-------------------///////////// //|||||||||||||||
Martin Schultz, DEAS, Harvard University, 29 Oxford St., Pierce 109,
Cambridge, MA 02138 phone (617) 496 8318 fax (617) 495 4551
e-mail mgs@io.harvard.edu web http://www-as/people/staff/mgs/

********* ADDRESS CHANGE : AFTER JULY 15, 1999 ***************

Max-Planck-Institut fuer Meteorologie >>> N E W <<<
Bundesallee 55 >>> N E W <<<
20147 Hamburg >>> N E W <<<
Germany >>> N E W <<<
phone (+49 40) 41173 - 0 >>> N E W <<<

email martin.schultz@dkrz.de >>> N E W <<<
(email to mgs@io.harvard.edu will be forwarded)

************************************************************ *******
Re: xwindow question [message #16169 is a reply to message #16164] Thu, 01 July 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Nando Iavarone (f.iavarone@acsys.it) writes:

> I'm using the david fanning's "xwindow" procedure.
> I used it with the keyword "wid" to make other oeparations
> on the display window.
> I need to have the PS output of currently display and not
> of the starting display.
>
> Has anyone just modified the procedure to do that?

I don't think it *could* be modified like that in its
current form, unless you were content with a PostScript
screen dump, which I usually find unsatisfactory.

But this is the *perfect* opportunity for someone
(not me) to write a generic "graphics object" for use
in XWindow. Boy, *then* you would have something! :-)

Cheers,

David
--
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Image tranpose
Next Topic: TV oddities

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

Current Time: Sat Oct 11 21:06:30 PDT 2025

Total time taken to generate the page: 0.80824 seconds