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

Re: Export plot to PS



Martin Skou Andersen wrote:
> 
> Hi there...
> Is there a way to export/save a plot to an PostScript file?
> Or in anyway save a plot made by idl, to a image?
> 
> Thanx
> --
> MVH. Martin Skou Andersen
> E-mail: Skou@fys.ku.dk
>         Martin_Skou@mail.tele.dk
> Homepage: http://www.fys.ku.dk/~skou/

I believe that you created the plot using direct graphics as opposed
to object graphics (otherwise you would probably know the answer to
your question ;-).

The answer is no, but ...

You cannot "copy" the output of several IDL plotting commands to a ps
file or to the printer (leaving aside the tvread() option ->
http://www.dfanning.com where you will only get a bitmap copy). 

In order to produce a ps plot, you must "rerun" all your plotting
commands after switching the devide to 'PS'. Here is a short tutorial:

plot, findgen(100)     ; this should produce a graphics window
olddev = !D.Name
set_plot, 'PS'
plot, findgen(100)     ; this will now be written into a postscript
file 'idl.ps'
device, /close         ; *very* important
set_pot, olddev

You can use the device procedure (after set_plot,'PS') in order to set
up the postscript device according to your needs. Much more
comfortable, though, is the use of David Fanning's fsc_psconfig
program.

Of course you can also write a couple of objects where the plot is
made into a draw widget instead of a "normal" graphics window, and
then you have a print button which changes the device to ps and calls
the Show method again. This is probably what you really want, but I am
sorry, it's not ready yet ;-(

Good luck,

Martin

-- 
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie    [[
[[                      Bundesstr. 55, 20146 Hamburg             [[
[[                      phone: +49 40 41173-308                  [[
[[                      fax:   +49 40 41173-298                  [[
[[ martin.schultz@dkrz.de                                        [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[