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

Home » Public Forums » archive » Re: Write graphics to two devices simultaneously?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Write graphics to two devices simultaneously? [message #66059 is a reply to message #66057] Sun, 12 April 2009 08:51 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Apr 11, 11:08 am, David Fanning <n...@dfanning.com> wrote:
> stefan5...@hotmail.com writes:
>> Is there any way to print to an X11 window and simultaneously dump the
>> X11 output to a postscript file?
>
>> Of course, I could just copy paste the plot information for a new
>> device, but it would make the procedure annoyingly long. Is there a
>> command to take the contents of an X11 device and save it to the
>> postscript device, or a command to write to postscript at the same
>> time as X11?
>
> It is not possible to write to two graphics devices at
> the same time. But, well-written IDL graphics programs
> don't much care what device they are being written to,
> which allows you to use something like PS_START/PS_END
> to write them to PostScript files simply:
>
> Consider displaying a histogram of an image, using HISTOPLOT:
>
>    ; An image.
>    image = LoadData(7)
>
>    ; Write to display.
>    Histoplot, image, /FILL, POLYCOLOR='rose'
>
>    ; Write to PostScript file.
>    PS_START
>    Histoplot, image, /FILL, POLYCOLOR='rose'
>    PS_END
>
> Such commands work on Windows, LINUX, and Macintosh computers,
> and for Z-buffer and PRINTER devices, etc.
>
> Programs to help with this are found in the Coyote Library:
>
>   http://www.dfanning.com/programs/coyoteprograms.zip
>
> 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.")

For cases like that, I tend to stick the entire thing into a for loop:

for ploti=0,1 do begin
if ploti eq 1 then ps_start
... insert plotting commands here
if ploti eq 1 then ps_end
endfor

That way you can ensure that your plot commands are absolutely
identical.

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What exactly does the command "strech" do to the colormap?
Next Topic: Reading ENVI evf files

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

Current Time: Mon Dec 01 12:32:42 PST 2025

Total time taken to generate the page: 3.91457 seconds