The purpose of cgPlotS is to create a wrapper for the traditional IDL graphics command, PlotS. The primary purpose of this is to create plot commands that work and look identically both on the display and in PostScript files.
The program requires the Coyote Library to be installed on your machine.
- x in required type=any
A vector or scalar argument providing the X components of the points to be drawn or connected. May be a 2xN or 3xN array, if Y and Z parameters are not used.
- y in optional type=any
A vector or scalar argument providing the Y components of the points to be drawn or connected.
- z in optional type=any
A vector or scalar argument providing the Z components of the points to be drawn or connected.
- ADDCMD in optional type=boolean default=0
Set this keyword to add the command to an cgWindow display.
- COLOR in optional type=string/integer default=opposite
If this keyword is a string, the name of the data color. Color names are those used with cgColor. Otherwise, the keyword is assumed to be a color index into the current color table. May be a vector of the same length as X.
- MAP_OBJECT in optional type=object
If you are drawing on a map projection set up with Map_Proj_Init and using projected meter space, rather than lat/lon space, then you can use this keyword to provide a cgMap object that will allow you to convert the
yparameters from longitude and latitude, respectively, to projected meter space before drawing. X and Y must both be present.
- PSYM in optional type=integer
Any normal IDL PSYM values, plus any value supported by the Coyote Library routine cgSYMCAT. An integer between 0 and 46. May also be specified as a symbol names. See
- SYMCOLOR in optional type=string/integer/vector default=COLOR
If this keyword is a string, the name of the symbol color. By default, same as COLOR. Otherwise, the keyword is assumed to be a color index into the current color table. May be a vector of the same length as X.
- SYMSIZE in optional type=float/vector default=1.0
A scalar or vector of symbol sizes. Default is 1.0. May be a vector of the same length as X.
- WINDOW in optional type=boolean default=0
Set this keyword to add the command to the current cgWindow application.
- _EXTRA in optional type=any
Any IDL PlotS keyword not defined here is allowed in the program.
Use like the IDL PLOTS command:
IDL> cgPlot, Findgen(11) IDL> cgPlotS, !X.CRange, [5,5], LINESTYLE=2, THICK=2, COLOR='red'
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: firstname.lastname@example.org Coyote's Guide to IDL Programming: http://www.idlcoyote.com
Copyright (c) 2010-2013, Fanning Software Consulting, Inc.
Written, 12 November 2010. DWF. Added SYMCOLOR keyword. PSYM accepts all values from cgSYMCAT. SYMCOLOR and SYMSIZE keywords can be vectors the size of x. 15 November 2010. DWF Added ability to support COLOR keyword as a vector the size of x. 15 November 2010. DWF Now setting decomposition state by calling SetDecomposedState. 16 November 2010. DWF. Final color table restoration skipped in Z-graphics buffer. 17 November 2010. DWF. Changes so that color variables don't change type. 23 Nov 2010. DWF. Modified to use decomposed color, if possible. 24 Dec 2010. DWF. Whoops! Programming is like herding cats! 29 Dec 2010. DWF. In some cases, I was turning BYTE values to strings without converting to INTEGERS first. 30 Dec 2010. DWF. Moved setting to decomposed color before color selection process to avoid PostScript background problems when passed 24-bit color integers. 12 Jan 2011. DWF. Added WINDOW keyword. 24 Jan 2011. DWF. Made a modification that allows THICK and COLOR keywords apply to symbols, too. 24 Feb 2011. DWF. Modified error handler to restore the entry decomposition state if there is an error. 17 March 2011. DWF Fixed a problem in which the colors of the line was not accurate in some cases. 29 November 2011. DWF. Added the MAP_OBJECT keyword for plotting on map projections. 2 Jan 2012. DWF. Made sure the map coordinate system is established before drawing if a map object is passed into the program. 26 June 2012. DWF. Added the ability to specify the PSYM keyword as a string. 20 July 2012. DWF. Added a check for a window to draw into, if needed. 8 July 2012. DWF. Loop counter didn't assume someone would pass in 2D array of XY pairs. Fixed. 31 Jan 2013. DWF.
|Modification date:||Thu Jan 31 15:05:07 2013|