How to display NG created in a buffer? [message #77500] |
Fri, 02 September 2011 10:47 |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
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
|
|
|