Re: How to display NG created in a buffer? [message #77492] |
Fri, 02 September 2011 16:22 |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning wrote:
> Paul van Delst writes:
>
>> It's a bummer that a bunch of graphics objects I
>> created are so tantalisingly close (I can almost
>> taste them!) but are unavailable to me.
>
> To me, it seems as if some very bright ideas have
> gone into *making* these graphics objects, but
> no one has sat down yet to *use* them. Because
> when you start to use them, these deficiencies
> appear regularly. I hear this story over and
> over again. :-(
And the speed... don't forget the speed. The reason I'm plotting these graphics to the buffer is because if I produce
them the Direct Graphics Way, i.e. just plotting them on screen and saving them as I go, it'll take a looong time.
So, plotting them into the buffer and stuffing their references into a hash (where the hash key is the filename root) is
the easiest way I've found to generating the output quickly, e.g. for the "gref" hash I produce,
IDL> foreach graphic, gref, name do graphic.save, name+'.eps'
This produces my raft of EPS output for inclusion in a LaTeX document.
All of this would've taken much less time if I could display the buffer-contents for a particular plot, tweak it (e.g.
adjusting legends, changing symbols, whatever), and then output it.
I guess if the speed of NG output was the same as DG, I wouldn't be grousing about any of this because I could just
re-do everything instantaneously (exactly like I would if I was using DG).
Life is too short, and productivity demands too high, to put up with NG output being slower than a snail in a
straitjacket. Heaven forbid if I wanted to plot more than 100000 or so points.... I mean it's 7:30pm on a Friday and I'm
here at work making plots! Crikey... I'm going home.
cheers,
paulv
|
|
|
Re: How to display NG created in a buffer? [message #77495 is a reply to message #77492] |
Fri, 02 September 2011 15:04  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> It's a bummer that a bunch of graphics objects I
> created are so tantalisingly close (I can almost
> taste them!) but are unavailable to me.
To me, it seems as if some very bright ideas have
gone into *making* these graphics objects, but
no one has sat down yet to *use* them. Because
when you start to use them, these deficiencies
appear regularly. I hear this story over and
over again. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: How to display NG created in a buffer? [message #77498 is a reply to message #77497] |
Fri, 02 September 2011 13:33  |
manodeep@gmail.com
Messages: 33 Registered: June 2006
|
Member |
|
|
On Sep 2, 12:47 pm, Paul van Delst <paul.vande...@noaa.gov> wrote:
> Hello,
>
> I'm doing this sort of thing:
>
> w = window(dimensions=[800,1000], buffer=buffer)
>
> ; Plot Tb spectra
> spectra = plot(xrange,yrange,/current, ...etc...)
>
> for many many plots and to generate output I set the "buffer" keyword.
>
> Everything works fine. When I return the window id, w, I can create output like so,
>
> IDL> w.save, 'test.png'
> IDL> $display test.png
>
> and, yea verily, there is my plot.
>
> But what I also want to do is to redisplay my graphic in the buffer on a regular window. Something like
>
> IDL> w.display
>
> I tried using "show" with no luck:
>
> IDL> w.show
> % Attempt to call undefined method: 'GRAPHICSBUFFER::SHOW'.
> % Execution halted at: $MAIN$
>
> I notice there is an IDLgrBuffer object, and the docs tell me
> "Object trees can be drawn to instances of the IDLgrBuffer object and the resulting image can be retrieved from the
> buffer using the Read() method."
>
> But that gives me an IDLgrImage object:
>
> IDL> help, w.read()
> <Expression> OBJREF = <ObjHeapVar605455(IDLGRIMAGE)>
>
> which simply kicks the can down the road: How to display an IDLgrImage object? And is that what I want (i.e. an image)?
> I want to be able to manipulate the displayed graphics just as if I had created it in an "active" window.
>
> Any tips, tricks appreciated.
>
> cheers,
>
> paulv
Haje/Mike discussed something similar (using CopyWindow) here:
http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/c296041d95207a04/e159977b26f5a678
HTH,
Manodeep
|
|
|
Re: How to display NG created in a buffer? [message #77499 is a reply to message #77498] |
Fri, 02 September 2011 11:59  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paul van Delst writes:
> I'm doing this sort of thing:
>
> w = window(dimensions=[800,1000], buffer=buffer)
>
> ; Plot Tb spectra
> spectra = plot(xrange,yrange,/current, ...etc...)
>
> for many many plots and to generate output I set the "buffer" keyword.
This is a tough question to ask on a Friday afternoon
of a long weekend. The two people who are using function
graphics have already left for the beach! :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|