|
IDL Reference Guide: IDL Direct Graphics Devices |
|
BINARY, CLOSE_FILE, COLORS, ENCODING, FILENAME, NCAR, SET_CHARACTER_SIZE, TEXT
The CGM, Computer Graphics Metafile, standard describes a device independent file format used for the exchange of graphic information. The IDL CGM driver produces CGM files encoded in one of three methods: Text, Binary or NCAR Binary. To direct graphics output to a CGM file, issue the command:
SET_PLOT,'CGM'
This causes IDL to use the CGM driver for producing graphical output. Once the CGM driver is selected, the DEVICE procedure controls its actions, as described below. Typing HELP, /DEVICE displays the current state of the CGM driver. The CGM driver defaults to the binary encoding using 256 colors.
This section describes details specific to IDL's CGM implementation:
ERASE, INDEX (where INDEX is not 0) generates the message "Value of background color is out of allowed range." For consistent results, modify the color table before any graphics are output.
; Select the CGM driver: SET_PLOT, 'CGM' ; Create a 64 x 64 element array: X = DIST(64) ; Display the image (fills entire screen): TVSCL, X ; Now display 4 images on the screen: ERASE XS = !D.X_SIZE / 2 ; Size of each image, X dimension YS = !D.Y_SIZE / 2 ; Size of each image, Y dimension TVSCL, X, 0, XSIZE=XS, YSIZE=YS ; Upper left TVSCL, X, 1, XSIZE=XS, YSIZE=YS ; Upper right TVSCL, X, 2, XSIZE=XS, YSIZE=YS ; Lower left TVSCL, X, 3, XSIZE=XS, YSIZE=YS ; Lower right
IDL Online Help (March 06, 2007)