Re: Export plot to PS [message #24428] |
Thu, 29 March 2001 05:33 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Martin Skou Andersen (skou@fys.ku.dk) writes:
> 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?
Well, I'm almost too embarrassed to mention it, but
there is MPI_PLOT. :-)
http://www.dfanning.com/programs/mpi_plot.zip
And if what you mean by "plot" is "any kind of
IDL display window", then you could look at
either FSC_Window or even something as simple
as PrintWindow:
http://www.dfanning.com/programs/fsc_window.pro
http://www.dfanning.com/tip_examples/printwindow.pro
If you just want to capture whatever is in an IDL
graphics window and save it as some kind of file
(e.g., JPEG, TIFF, etc.), then TVREAD does it all
in one step:
http://www.dfanning.com/programs/tvread.pro
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
|
|
|
Re: Export plot to PS [message #24430 is a reply to message #24428] |
Thu, 29 March 2001 03:49  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
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 [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|