Fanning Software Consulting

Coyote Graphics System (CGS) Commands

QUESTION: What in the world is the Coyote Graphics System (CGS) I am hearing so much about!?

ANSWER: The Coyote Graphics System (CGS) is a collection of Coyote Library programs that turn the traditional IDL graphics commands (e.g., Plot, Contour, Surface, TV, etc.) into modern programs that duplicate the device independence, color model independence, and functionality (including resizeable graphics windows) of the latest “new” graphics system in IDL. Best of all, this functionality is available in any version of IDL. Coyote Graphics code is available in the Plot Gallery for over 50 different types of IDL graphics plots, including line plots, contour plot, image plots, and many more.

The Coyote Graphics System is explained in my most recent book, Coyote's Guide to Traditional IDL Graphics. Please have a look at what people are saying about the book and the Coyote Graphics System. Here is what one user had to say about the Coyote Library.

I am coming from the java/python/etc world and I am now in a group that is all IDL all the time. It seems, in general, to be a very powerful language that can do a ton of really cool stuff, but it seems like IDL has this massive inertia that resists any sort of fundamental change. As a result, the syntax is stuck in the 1970s and it is very hard for someone used to modern syntax to get used to some of IDL’s “features.” To this end, I really appreciate having this library of functions that removes many of the nuances of IDL and gives me an interface that works the way I expect it to.

The most important features of Coyote Graphics System are these:

Coyote Graphics System Programs

The Coyote Graphics System really makes use of all the programs in the Coyote Library, but here are short descriptions of the programs that belong specifically to the CGS system.

Primary Graphics Programs

Other Graphics Programs

Graphics Utility Routines

Graphics Window Routines

Graphics Output Routines

  • cgPS2PDF -- A program that converts PostScript files to PDF files in a machine independent way, using Ghostscript or its equivalent for the conversion process.
  • cgPS2Raster -- A program that converts PostScript files to five different types of raster files using ImageMagick to do the conversion. See IDL Output for Web Display for additional information.
  • cgPS_Open and cgPS_Close -- I use these commands to create PostScript files, which I turn into high-quality graphics files (PNG, JPEG, TIFF, etc.) with ImageMagick for display on web pages and in presentations. I used to gripe about fonts in traditional graphics. But not since I learned to use ImageMagick. Now I produce a PostScript file and create a high quality PNG, JPEG, or TIFF file at the same time. I don't even think about fonts anymore.

    For example, to create the contour plot example above, I typed these commands at the IDL command line. The resulting output is right-side-up, too, because cgPS_Close automatically calls cgFixPS to put those upside-down IDL landscape files in the proper orientation for display in other programs.)
       cgPS_Open, Filename='coyote_graphics.ps'
       data = cgDemoData(2)
       cgLoadCT, 33, NColors=12, Bottom=1
       cgContour, data, /Fill, NLevels=12, Position=[0.125,0.125,0.9,0.75], $
          C_Colors=Indgen(12)+1,  /Outline
       cgColorbar, Range=[Min(data), Max(data)], Divisions=12, NColors=12, Bottom=1, $
          Position=[0.125, 0.87, 0.9, 0.94], XTicklen=1, XMINOR=0
       cgPS_Close, /PNG, Resize=12.5
    

    Other Coyote Graphics routines are being added all the time. Check the on-line documenation for the latest updates and routines.

    Version of IDL used to prepare this article: IDL 7.0.1.