Re: Directing a plot directly to PNG file [message #41129] |
Thu, 30 September 2004 02:09 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jan R. Andersen writes:
> I want to create a contour plot and output it directly to a PNG file
> instead of to the screen. In gnuplot this is done simply by the
> commands
> set terminal PNG
> set output "somefilename.png"
>
> A plot is then sent to the file instead of to the screen.
>
> I have found no way to do this in IDL. Does anybody have an idea?
If I didn't want to see it on the screen, I would draw
it in a pixmap or Z-grahics buffer. Something like
this would work:
Window, /Pixmap
Contour, ....
ok = TVRead(/PNG, /NoDialog, Filename='mycontour')
WDelete, !D.Window
You can find TVREAD here:
http://www.dfanning.com/programs/tvread.pro
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|