comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Automatic Output to PS and Raster in Coyote Graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Automatic Output to PS and Raster in Coyote Graphics [message #78565] Fri, 09 December 2011 10:40 Go to next message
David Fanning is currently offline  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.")
Re: Automatic Output to PS and Raster in Coyote Graphics [message #78741 is a reply to message #78565] Sun, 11 December 2011 18:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> 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

There have been a couple of tweaks to this functionality
over the weekend to make the functionality even easier
to use. For example, now you can use the OUTPUT keyword
to specify both the type of file output and the name
of the output file:

cgPlot, cgDemodata(1), Output='myplot.png'
cgSurf, cgDemodata(2), Output='mysurface.tif'
cgImage, cgDemodata(7), /Axes, Output='myimage.pdf'

Here is an article that describes the functionality
in a bit more detail:

http://www.idlcoyote.com/cg_tips/cgoutput.php

cgWindow and cgControl have both also been updated
to all programmatic control of all supported types
of output.

You will need to update your Coyote Library to use
the functionality:

http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip

And you will need third party software to do the conversions
to PDF and raster file types. Details in the articles.

This is the cat's meow on my machine. Let me know if you
are having any problems getting it to work on yours.

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The best way to bin data to a grid? (may not be an IDL-specific question)
Next Topic: Re: IDLDOC 3.4.1 Problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:17:43 PDT 2025

Total time taken to generate the page: 0.00787 seconds