Automatic Output to PS and Raster in Coyote Graphics [message #78565] |
Fri, 09 December 2011 10:40  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
Yesterday's announcement of big changes in Coyote Graphics
routines was so...well, let's just say this is a pretty
hard group to impress. So, Coyote and I decided to pull
an all-nighter and come up with something REALLY good
for you. (Most of Coyote's suggestions were, you know,
not appropriate, but nothing new there!)
Anyway, we are trying again today with the announcement
that Coyote Graphic routines can now send their output
*directly* to PostScript and raster output files via
a new OUTPUT keyword. The allowed values are:
'PS' - PostScript file
'EPS' - Encapsulated PostScript file
'PDF' - PDF file
'BMP' - BMP raster file
'GIF' - GIF raster file
'JPEG' - JPEG raster file
'PNG' - PNG raster file
'TIFF' - TIFF raster file
You will be asked for the name of the output file,
unless you specify it with the OUTFILENAME keyword.
The following Coyote Graphics routines allow this
functionality: cgBarPlot, cgBoxPlot, cgHistoPlot,
cgPlot, cgContour, cgImage, cgSurf, and cgShadeSurf.
This functionality assumes you have the usual
third-party conversion software (ImageMagick
and Ghostview or the equivalent) installed. It
should not be used for multiple plots. It is really
just a convenience for creating a single plot in
a PostScript or raster file.
Taking advantage of the new OUTLINE keyword to
cgContour, here is how you could make a PNG file
of a filled contour plot:
cgLoadCT, 33, NColors=8, Bottom=1
cgContour, cgDemoData(2), NLevels=8, C_Colors=Indgen(8)+1, $
/Fill, /Outline, Output='PNG', Outfilename='cgcontour.png'
As usual, Coyote Graphics documentation is here:
http://www.idlcoyote.com/idldoc/cg/index.html
And the Coyote Library code is here:
http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|