Re: Saving Plot Products [message #31882] |
Mon, 26 August 2002 23:47 |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Justin Sieglaff wrote:
>
> Hi everyone....hopefully someone can help me out. I am creating some
> plots using the PLOT command and was wondering how I could a)specify
> the size of the plot and b)save the plots as JPEGs/PNGs, etc. Any
> help would be great!
>
> Thanks,
>
> Justin Sieglaff
Why don't using Postscript Output?
old_dev=!D.name
SET_PLOT,'PS'
DEVICE,FILENAME='my_output.ps', PREVIEW=0,$
/COLOR, YOFFSET=27, YSIZE=16,XOFFSET=2,XSIZE=25,$
/LANDSCAPE
TEK_COLOR
x=INDGEN(37,/FLOAT)*10
y=SIN(x*!dtor)
PLOT,x,y,/nodata
OPLOT,x,y,linestyle=3,PSYM=-1,THICK=2,COLOR=2
DEVICE,/CLOSE
SET_PLOT,old_dev
If you then like to have an image you can use for example
pstoimg -type png -aaliastext -crop a -density 150 -flip r90
my_output.ps
display my_output.png
Comment from the help:
pstoimg - Convert a PostScript file to a bitmap image
using Ghostscript and the Netpbm utilities
The output as image has this way a much higher quality!
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
|
|
|
Re: Saving Plot Products [message #31888 is a reply to message #31882] |
Mon, 26 August 2002 18:08  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jim Brauher (jimby@ipac.caltech.edu) writes:
> After you make your plot with the PLOT command, do the following to
> create a JPEG/PNG from this plot:
>
> write_png,'test.png',tvrd()
> write_jpeg,'test.jpeg',tvrd()
Well, unless you are on a 24-bit display and
want color images, etc. Then you are better off
sticking to TVREAD or SAVEIMAGE or something like
that. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Saving Plot Products [message #31891 is a reply to message #31888] |
Mon, 26 August 2002 16:45  |
jimby
Messages: 4 Registered: August 2002
|
Junior Member |
|
|
justins@ssec.wisc.edu (Justin Sieglaff) wrote in message news:<9bc4f51c.0208261004.3b5ec44c@posting.google.com>...
> Hi everyone....hopefully someone can help me out. I am creating some
> plots using the PLOT command and was wondering how I could a)specify
> the size of the plot and b)save the plots as JPEGs/PNGs, etc. Any
> help would be great!
>
> Thanks,
>
> Justin Sieglaff
Justin,
After you make your plot with the PLOT command, do the following to
create a JPEG/PNG from this plot:
write_png,'test.png',tvrd()
write_jpeg,'test.jpeg',tvrd()
Cheers,
Jim Brauher
|
|
|
Re: Saving Plot Products [message #31895 is a reply to message #31891] |
Mon, 26 August 2002 12:09  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Justin Sieglaff (justins@ssec.wisc.edu) writes:
> Hi everyone....hopefully someone can help me out. I am creating some
> plots using the PLOT command and was wondering how I could a)specify
> the size of the plot and b)save the plots as JPEGs/PNGs, etc. Any
> help would be great!
a) Window, xsize=400, ysize=350
Plot, dta
b) snap = TVRead(/JPEG); /PNG, /TIFF, etc.
http://www.dfanning.com/programs/tvread.pro
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|