The following table indicates which keywords are accepted by the DEVICE procedure. The NULL device is not listed as it accepts no keywords. Details of the various keywords can be found on the page indicated in the table.
NOTE: Most keywords to the DEVICE procedure are "sticky" -- that is, once you set them, they remain in effect until you explicitly change them again, or end your IDL session. The exceptions are keywords used to return a value from the system (GET_FONTNAMES, for example) and those that perform a one-time-only operation (CLOSE_FILE, for example).
AVANTGARDE |
|||||||||||||
AVERAGE_LINES |
|||||||||||||
BINARY |
BINARY · |
||||||||||||
BITS_PER_PIXEL |
|||||||||||||
BKMAN |
BKMAN · |
||||||||||||
BOLD |
BOLD · |
||||||||||||
BOOK |
BOOK · |
||||||||||||
BYPASS_TRANSLATION |
|||||||||||||
CLOSE |
CLOSE · |
||||||||||||
CLOSE_DOCUMENT |
|||||||||||||
CLOSE_FILE |
|||||||||||||
COLOR |
COLOR · |
||||||||||||
COLORS |
COLORS · |
||||||||||||
COPY |
COPY · |
||||||||||||
COURIER |
COURIER · |
||||||||||||
CURSOR_CROSSHAIR |
|||||||||||||
CURSOR_IMAGE |
|||||||||||||
CURSOR_MASK |
|||||||||||||
CURSOR_ORIGINAL |
|||||||||||||
CURSOR_STANDARD |
|||||||||||||
CURSOR_XY |
|||||||||||||
DECOMPOSED |
|||||||||||||
DEMI |
DEMI · |
||||||||||||
DEPTH |
DEPTH · |
||||||||||||
DIRECT_COLOR |
|||||||||||||
EJECT |
EJECT · |
||||||||||||
ENCAPSULATED |
|||||||||||||
ENCODING |
ENCODING · |
||||||||||||
FILENAME |
FILENAME · |
||||||||||||
FLOYD |
FLOYD · |
||||||||||||
FONT |
FONT · |
||||||||||||
FONT_INDEX |
|||||||||||||
FONT_SIZE |
|||||||||||||
GET_CURRENT_FONT |
|||||||||||||
GET_FONTNAMES |
|||||||||||||
GET_FONTNUM |
|||||||||||||
GET_GRAPHICS_FUNC |
|||||||||||||
GET_SCREEN_SIZE |
|||||||||||||
GET_VISUAL_NAME |
|||||||||||||
GET_WINDOW_POSITION |
|||||||||||||
GET_WRITE_MASK |
|||||||||||||
GIN_CHARS |
|||||||||||||
GLYPH_CACHE |
|||||||||||||
HELVETICA |
|||||||||||||
INCHES |
INCHES · |
||||||||||||
INDEX_COLOR |
|||||||||||||
ISOLATIN1 |
|||||||||||||
ITALIC |
ITALIC · |
||||||||||||
LANDSCAPE |
|||||||||||||
LIGHT |
LIGHT · |
||||||||||||
MEDIUM |
MEDIUM · |
||||||||||||
NARROW |
NARROW · |
||||||||||||
NCAR |
NCAR · |
||||||||||||
OBLIQUE |
OBLIQUE · |
||||||||||||
OPTIMIZE |
OPTIMIZE · |
||||||||||||
ORDERED |
ORDERED · |
||||||||||||
OUTPUT |
OUTPUT · |
||||||||||||
PALATINO |
PALATINO · |
||||||||||||
PIXELS |
PIXELS · |
||||||||||||
PLOT_TO |
PLOT_TO · |
||||||||||||
PLOTTER_ON_OFF |
|||||||||||||
POLYFILL |
POLYFILL · |
||||||||||||
PORTRAIT |
PORTRAIT · |
||||||||||||
PREVIEW |
PREVIEW · |
||||||||||||
PRINT_FILE |
|||||||||||||
PSUEDO_COLOR |
|||||||||||||
RESET_STRING |
|||||||||||||
RESOLUTION |
|||||||||||||
RETAIN |
RETAIN · |
||||||||||||
SCALE_FACTOR |
|||||||||||||
SCHOOLBOOK |
|||||||||||||
SET_CHARACTER_SIZE |
|||||||||||||
SET_COLORMAP |
|||||||||||||
SET_COLORS |
|||||||||||||
SET_FONT |
SET_FONT · |
||||||||||||
SET_GRAPHICS_FUNCTION |
|||||||||||||
SET_RESOLUTION |
|||||||||||||
SET_STRING |
|||||||||||||
SET_TRANSLATION |
|||||||||||||
SET_WRITE_MASK |
|||||||||||||
STATIC_COLOR |
|||||||||||||
STATIC_GRAY |
|||||||||||||
SYMBOL |
SYMBOL · |
||||||||||||
TEK4014 |
TEK4014 · |
||||||||||||
TEK4100 |
TEK4100 · |
||||||||||||
TEXT |
TEXT · |
||||||||||||
THRESHOLD |
|||||||||||||
TIMES |
TIMES · |
||||||||||||
TRANSLATION |
|||||||||||||
TRUE_COLOR |
|||||||||||||
TTY |
TTY · |
||||||||||||
USER_FONT |
|||||||||||||
VT240 |
|||||||||||||
VT241 |
|||||||||||||
VT340 |
|||||||||||||
VT341 |
|||||||||||||
WINDOW_STATE |
|||||||||||||
XOFFSET |
XOFFSET · |
||||||||||||
XON_XOFF |
XON_XOFF · |
||||||||||||
XSIZE |
XSIZE · |
||||||||||||
YOFFSET |
YOFFSET · |
||||||||||||
YSIZE |
YSIZE · |
||||||||||||
ZAPFCHANCERY |
|||||||||||||
ZAPFDINGBATS |
|||||||||||||
Z_BUFFERING |
Keywords accepted by the DEVICE command are described below. A list of devices that accept the keyword is included in parentheses below the keyword name.
Controls the method of writing images to the VT240. If this keyword is set, (default setting), even and odd pairs of image lines are averaged and written to a single line. If clear, each image line is written to the screen. See the discussion below. This keyword has no effect when using a VT300 series terminal.
( The CGM Device )
Set this keyword to set the encoding type for the CGM output file to binary.
IDL is capable of producing PostScript images with 1, 2, 4, or 8 bits per pixel. Using more bits per pixel gives higher resolution at the cost of generating larger files. BITS_PER_PIXEL is used to specify the number of bits to use. If you do not specify a value of 1, 2, 4, or 8, IDL selects the closest one.
It should be noted that many laser printers, including the original Apple Laserwriter are capable of only 32 different shades of gray (which can be represented by 5 bits). Thus, specifying 8 bits per pixel does not give 256 apparent shades of grey as might be expected, only 32, at a cost of sending twice the number of bits to the printer. Often, 4 bits (16 levels of gray) will give acceptable results with a large savings in file size.
Set this keyword to specify that the bold version of the current PostScript font should be used.
Set this keyword to specify that the book version of the current PostScript font should be used.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to bypass the translation tables, allowing direct specification of color indices. Color Translation Pixel values read via the TVRD function are not translated if this keyword is set, and the result contains the byte value of the actual pixel values present in the display.
By default, the translation tables are used with shared and static color tables. When using displays with private color tables, the translation tables are bypassed.
This keyword is accepted by the WIN device (for compatibility with the X device), but has no effect when set.
Set this keyword to deallocate the memory used by the Z-buffer. The Z-buffer device is reinitialized if subsequent graphics operations are directed to the device.
Set this keyword to have IDL send any buffered output to the currently selected printer. This keyword is applicable only when the printer device is selected. See The Printer Device for details.
( The CGM Device , The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device , The Regis Terminal Device , The Tektronix Device )
Set this keyword to have IDL output any buffered commands and close the current graphics file.
Caution: Under operating systems other than VMS, if you close the output file and then cause IDL to produce more output (e.g., by executing a new PLOT command), IDL will open the file again, causing the contents of the recently closed file to be lost. To avoid this, use the FILENAME keyword to specify a different file name or use SET_PLOT to disable the graphics driver, or be sure to print the closed output file before creating more output.
See the discussion of printing output files in Printing Graphics Output Files
( The PCL Device , The PostScript Device )
Set this keyword to enable color PCL or PostScript output. See The PCL Device or The PostScript Device .
( The CGM Device , The Tektronix Device )
This keyword specifies the maximum number of colors and the size of the color table used for output. The value of the system variable fields !D.N_COLORS and !D.TABLE_SIZE are set to this value and !P.COLOR is set to one less than this value.
This keyword sets the number of colors supported by a 4100 series terminal. For example, if your terminal has 4-bit planes, the number of colors is 2 4 = 16:
Valid values of this parameter are: 2, 4, 8, 16, or 64; other values will cause problems. Some Tektronix terminals will not operate properly if this parameter does not exactly match the number of colors available in the terminal hardware.
This parameter sets the field !D.N_COLORS, which affects the loading of color tables, the scaling used by the TVSCL procedure, and the number of bits output by the TV procedure to the terminal. It also changes the default color, !P.COLOR to the number of colors minus one.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
Use this keyword to copy a rectangular area of pixels from one region of a window to another. COPY should be set a six or seven element array: [ X s , Y s , N x , N y , X d , Y d , W ], where: ( X s , Y s ) is the lower left corner of the source rectangle, ( N x , N y ) are the number of columns and rows in the rectangle, and ( X d , Y d ) is the coordinate of the destination rectangle. Optionally, W is the index of the window from which the pixels should be copied to the current window. If it is not supplied, the current window is used as both the source and destination.
( The Microsoft Windows Device , The X Windows Device )
Set this keyword to selects the crosshair cursor type. This is the IDL default.
Specifies the cursor pattern. The value of this keyword must be a 16-line by 16-column bitmap, contained in a 16-element short integer vector. The offset from the upper left pixel to the point that is considered the "hot spot" can be provided via the CURSOR_XY keyword.
When the CURSOR_IMAGE keyword is used to specify a cursor bitmap, the CURSOR_MASK keyword can be used to simultaneously specify the mask that should be used. In the mask, bits that are set indicate bits in the CURSOR_IMAGE that should be seen and bits that are not set are "masked out".
By default, the CURSOR_IMAGE bitmap is used for both the image and the mask. This can cause the cursor to be invisible on a black background (because only black pixels are allowed to be displayed).
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to select the window system's default cursor. Under X Windows, it is the cursor in use by the root window when IDL starts. For the Macintosh and Microsoft Windows devices, it is the arrow pointer.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
This keyword can be used to change the appearance of the cursor in IDL graphics windows.
This keyword selects one of the predefined cursors provided by the X Window system. The available cursors shapes are defined in the file cursorfonts.h in the directory /usr/include/X11 (Unix), or DECW$INCLUDE: (VMS). In order to use one of these cursors, you select the number of the cursor and provide it as the value of the CURSOR_STANDARD keyword. For example, the file gives the value of XC_CROSS as being 30. In order to make that the current cursor, use the statement:
A two element integer vector giving the ( X , Y ) pixel offset of the cursor "hot spot", the point which is considered to be the mouse position, from the lower left corner of the cursor image. This parameter is only applicable if CURSOR_IMAGE is provided. The cursor image is displayed top-down--the first row is displayed at the top.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
This keyword is used to control the way in which graphics color index values are interpreted when using displays with decomposed color ( TrueColor or DirectColor visuals). This keyword has no effect with other types of visuals.
Set this keyword to 1 to cause color indices to be interpreted as 3, 8-bit color indices where the least-significant 8 bits contain the red value, the next 8 bits contain the green value, and the most-significant 8 bits contain the blue value. This is the way IDL has always interpreted pixels when using visual classes with decomposed color.
Set this keyword to 0 to cause the least-significant 8 bits of the color index value to be interpreted as a PseudoColor index. This setting allows users with DirectColor and TrueColor displays to use IDL programs written for standard, PseudoColor displays without modification.
In older versions of IDL, color index values higher than !D.N_COLORS-1 were clipped to !D.N_COLORS-1 in the higher level graphics routines. In some cases, this clipping caused the exclusive-OR graphics mode to malfunction with raster displays. This clipping has been removed. Programs that incorrectly specified color indices higher than !D.N_COLORS-1 will now probably exhibit different behavior.
Set this keyword to specify that the demi version of the current PostScript font should be used.
( The LJ Device )
The DEPTH keyword specifies the number of significant bits in a pixel. The LJ250 can support between 1 and 4 significant bits (known also as planes). The number of available colors is related to the number of significant planes by the equation:
Therefore, the LJ250 can support 2, 4, 8, or 16 separate colors on a single page of output. The default is to use a single plane, producing monochrome output.
Since IDL is based around 8-bit pixels, it is necessary to define which bits in a 8-bit pixel are used by the LJ250 driver, and which are ignored. When using a depth of 1 (monochrome), dithering techniques are used to render images. In this case, all 8 bits are used. If more than a single plane is used, the least significant n bits of a 8-bit pixel are used, where n is the selected depth. For example, using a depth of 4, pixel values of 15, 31, and 47 are all considered to have the value 15 because all three values have the same binary representation in their 4 least significant digits.
When the depth is changed, the standard color map given in Table 7-5 of the LJ250/LJ252 Companion Color Printer Programmer Reference Manual is automatically loaded. Therefore, color maps should be loaded with TVLCT after changing the depth.
Set this keyword to select the DirectColor visual. The value of the keyword represents the number of bits per pixel. This keyword has effect only if no windows have been created. Visual classes are discussed in more detail in X Windows Visuals
( The HP-GL Device )
In order to perform an erase operation on a plotter, it is necessary to remove the current sheet of paper and load a fresh sheet. The ability of various plotters to do this varies, so the EJECT keyword allows you to specify what should be done. Values for the HP-GL Eject Keyword describes the possible values.
Many HP-GL plotters lack a sheet feeder, and require the user to load the next page manually. Therefore, the default action is for IDL to not issue any page eject instructions. In this case, you must restrict yourself to generating only a single plot at a time. If your plotter has a sheet feeder, you will want to issue the command:
to tell IDL that it should use the sheet feeder instead of placing the plotter off-line.
If your plotter does not have a sheet feeder, but it does understand the HP-GL NR command, use the command:
to place the plotter off-line at the start of every plot except the first one. This causes the plotter to wait between plots for the user to replace the paper. When the user puts the plotter back on-line, the graphics commands for the new page are executed by the plotter. Consult the programming manual for your plotter to determine if this instruction is provided.
Set this keyword to create an encapsulated PostScript file, suitable for importing into another document (e.g., a LaTeX or FrameMaker document).
NOTE: You must explicitly set this keyword to zero to create "regular" PostScript output after creating encapsulated output. (That is, like most keyword settings to the DEVICE procedure, the setting "sticks" until you change it, or until you quit IDL.)
Normally, IDL assumes that its PostScript-generated output will be sent directly to a printer. It therefore includes PostScript commands to position the plot on the page and to eject the page from the printer. These commands are undesirable if the output is going to be inserted into the middle of another PostScript document. If ENCAPSULATED is present and non-zero, IDL does not generate these commands.
IDL follows the standard PostScript convention for encapsulated files. It assumes the standard PostScript scaling is in effect (72 points per inch), In addition, it declares the size, or bounding box of the plotting region at the top of the output file. This size is determined when the output file is opened (when the first graphics command is given), by multiplying the size of the plotting region (as specified with the XSIZE and YSIZE keywords) by the current scale factor (as specified by the SCALE_FACTOR keyword).
Changing the size of the plotting region or scale factor once graphics have been output will not be reflected in the declared bounding box, and will confuse programs that attempt to import the resulting graphics. Therefore, when generating encapsulated PostScript, do not change the plot region size or scaling factor once any graphics commands have been issued. If you need to change these parameters, use the FILENAME keyword to start a new file.
( The CGM Device )
Set this keyword to set the CGM encoding type for the output file. Valid values are: 1 (binary encoding, the default), 2 (text encoding), and 3 (NCAR binary encoding). The encoding type can only be changed when there is no CGM file open.
( The CGM Device , The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device , The Regis Terminal Device , The Tektronix Device )
Normally, all generated output is sent to a file named idl.xxx where xxx is the lowercase name of the device shown in IDL Graphics Output Devices . The FILENAME keyword can be used to change these defaults. If FILENAME is specified:
1. If the file is already open (as happens if plotting commands have been directed to the file since the call to SET_PLOT), then the file is completed and closed as if CLOSE_FILE had been specified.
2. The specified file is opened for subsequent graphics output.
Under Unix, if you wish to send HP-GL output directly to a plotter without generating an intermediate file, you should specify the device special file for the plotter as the argument to FILENAME. For example, if your plotter is connected to a serial input/output port known on your system as /dev/ttya , you would issue the command:
All subsequent HP-GL output is sent directly to the plotter connected to serial port /dev/ttya .
( The LJ Device , The Macintosh Display Device , The PCL Device , The X Windows Device )
Set this keyword to select the Floyd-Steinberg method of dithering. This algorithm distributes the error, due to displaying intermediate shades in either black or white, to surrounding pixels. This method generally gives the most pleasing results but requires the most computer time.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
This keyword is now obsolete and has been replaced by the SET_FONT keyword. Code that uses the FONT keyword will continue to function as before, but we suggest that all new code use SET_FONT.
An integer representing the font index to be mapped to the current PostScript font.
Normally the font specification keywords (AVANTGARDE, etc.) take effect immediately to change the current font. The FONT_INDEX keyword alters this behavior. The current font is not changed. Instead, the specified font is mapped to the specified font index. This mapping can then be used within text strings to change the font in the middle of the string. Using PostScript Fonts
The default height used for displayed text. FONT_SIZE is given in points (a common typesetting unit of measure). The default size is 12 point text.
( The Macintosh Display Device , See The Printer Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to a named variable in which the name of the current font is returned as a scalar string. A null string is returned if the Windows font is the default font. If the current device is PRINTER, the current printer font is returned.
( The Macintosh Display Device , See The Printer Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to a named variable in which a string array containing the names of available fonts is returned. If no fonts are found, a null scalar string is returned. This keyword must be used in conjunction with the FONT keyword. Set the FONT keyword to a scalar string containing the name of the desired font or a wildcard.
( The Macintosh Display Device , See The Printer Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to a named variable in which the number of fonts available to your installation is returned. This keyword must be used in conjunction with the FONT keyword. Set the FONT keyword to a scalar string containing the name of the desired font or a wildcard.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device , The Z-Buffer Device )
Set this keyword to a named variable that returns the value of the current graphics function (which is set with the SET_GRAPHICS_FUNCTION keyword). This can be used to remember the current graphics function, change it temporarily, and then restore it. See the SET_GRAPHICS_FUNCTION keyword for an example.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to a named variable in which to return a two-word array that contains the width and height of the server's screen, in pixels.
(MAC, WIN, The X Windows Device )
Set this keyword equal to a named variable in which a string containing the name of the current visual class IDL is using is returned. Possible return values are:
Under X, if no connection to the X server has been established when the DEVICE procedure is called with this keyword set, a new connection is made.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
Set this keyword to a named variable that returns a two-element array containing the (X,Y) position of the lower left corner of the current window on the screen. The origin is also in the lower left corner of the screen.
( The Microsoft Windows Device , The X Windows Device )
Specifies the name of a variable to receive the current value of the write mask.
The number of characters IDL is to read when accepting a GIN (Graphics INput) report. The default is 5. If your terminal is configured to send a carriage return at the end of each GIN report, set this parameter to 6. If the number of GIN characters is too large, the IDL CURSOR procedure will not respond until two or more keys are struck. If it is too small, the extra characters sent by the terminal will appear as input to the next IDL prompt.
( The Macintosh Display Device , See The Printer Device , The PostScript Device , The Microsoft Windows Device , The Z-Buffer Device )
Set this keyword to a scalar specifying the maximum number of glyphs to cache at any given time. The first time a glyph from a TrueType font is used, it is tessellated into triangles. These triangles are cached so that the tessellation step is not repeated for each use of that glyph. If the glyph cache fills, the least used glyph will be released before a new glyph is generated and cached. The default is 256.
( The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device )
Normally, the XOFFSET, XSIZE, YOFFSET, and YSIZE keywords are specified in centimeters. However, if INCHES is present and non-zero, they are taken to be in inches instead.
Set this keyword to place the printer device in index color mode. This is the default. This keyword is applicable only when the printer device is selected. See The Printer Device for details.
Set this keyword to use Adobe ISO Latin 1 font encoding with any font that supports such coding. Use of this keyword allows access to many commonly-used foreign characters.
Set this keyword to specify that the italic version of the current PostScript font should be used.
( The HP-GL Device , The LJ Device , The PCL Device , See The Printer Device , The PostScript Device )
IDL normally generates plots with portrait orientation (the abscissa is along the short dimension of the page). If the LANDSCAPE keyword is set, landscape orientation (abscissa along the long dimension of the page) is used instead. Note that explicitly setting LANDSCAPE=0 is the same as setting the PORTRAIT keyword.
If the current device is PRINTER, and a page is open in the printer, it is closed and a new page set to landscape layout is started.
Set this keyword to specify that the light version of the current PostScript font should be used.
Set this keyword to specify that the medium version of the current PostScript font should be used.
Set this keyword to specify that the narrow version of the current PostScript font should be used.
( The CGM Device )
Set this keyword to set the encoding type for the CGM output file to NCAR binary.
The NCAR binary encoding is used exclusively by the NCAR graphics package. Version 3.01 of NCAR View ( ctrans , ictrans , and cgm2ncgm ) does not correctly handle the following graphic elements:
Set this keyword to specify that the oblique version of the current PostScript font should be used.
( The PCL Device )
It is desirable, though not always possible, to compress the size of the PCL output file. Such optimization reduces the size of the output file, and improves I/O speed to the printer. There are three levels of optimization:
Consult the programmers manual for your printer to determine it supports the required escape sequences. The required sequences are: <ESC>*b0M (select full graphics mode), <ESC>*b1M (select compacted graphics mode 1), and <ESC>*b2M (select compacted graphics mode 2). The HP LaserJet II does not support this optimization level. The DeskJet PLUS does.
( The LJ Device , The Macintosh Display Device , The PCL Device , The X Windows Device )
Set this keyword to select the ordered dither method. This introduces a pseudo-random error into the display by using a 4 by 4 "dither" matrix, yielding 16 apparent intensities. This is the default method.
This keyword is identical to the THRESHOLD keyword.
( The HP-GL Device , The PostScript Device )
Specifies a scalar string that is sent directly to the graphics output file without any processing, allowing the user to send arbitrary commands to the file. Since IDL does not examine the string, it is the user's responsibility to ensure that the string is correct for the target device.
( The LJ Device , The PCL Device )
Normally, the XOFFSET, XSIZE, YOFFSET, and YSIZE keywords are specified in centimeters. However, if the PIXELS keyword is set, they are taken to be in pixels instead. Note that the selected resolution will determine how large a region is actually written on the page.
( The Regis Terminal Device , The Tektronix Device )
Directs the Tektronix graphic output that would normally go to the user's terminal to the specified I/O unit. The logical unit specified should be open with write access to a device or file. Graphic output may be saved in files for later playback, redirected to other terminals, or to devices that can accept Textronix graphic commands.
Do not use the interactive graphics cursor when graphic output is not directed to your terminal.
To direct the graphic data to both the terminal and the file, set the unit to the negative of the actual unit number. Alternatively, you can use the TTY keyword, described below.
If the specified unit number is zero then Tektronix output to the file is stopped.
( The HP-GL Device )
There are some configurations in which a HP-GL plotter is connected between the computer and a terminal. In this mode (known as eavesdrop mode), the plotter ignores everything it is sent and passes it through to the terminal--the plotter is logically off. This state continues until an escape sequence is sent that turns the plotter logically on. At this point the plotter interprets and executes all input as HP-GL commands. Another escape sequence is sent at the end of the HP-GL commands to return the plotter to the logically off state.
Most configurations do not use eavesdrop mode, and the plotter is always logically on. However, if you are using this style of connection, you must use PLOTTER_ON_OFF to instruct IDL to generate the necessary on/off commands. If present and non-zero, PLOTTER_ON_OFF causes each output page to be bracketed by device control commands that turn the plotter logically on and off. Specifying a value of zero stops the issuing of such commands. You should only use this keyword before any output has been generated.
( The HP-GL Device )
Some plotters (e.g., HP7550A) can perform polygon filling in hardware, while others (e.g., HP7475) cannot. IDL therefore assumes that the plotter cannot, and generates all polygon operations in software using line drawing. Specifying a non-zero value for the POLYFILL keyword causes IDL to use the hardware polygon filling. Setting it to zero reverts to software filling.
Different implementations of HP-GL plotters may have different limits for the number of vertices that can be specified for a polygon region before the plotter runs out of internal memory. Since this limit can vary, the HP-GL driver cannot check for calls to POLYFILL that specify too many points. Therefore, it is possible for the user to produce HP-GL output that causes an error when sent to the plotter. To avoid this situation, minimize the number of points used. On the HP7550A, the limit is about 127 points. If you do generate output that exceeds the limit imposed by your plotter, you will have to break that polygon filling operation into multiple smaller operations.
( The HP-GL Device , The LJ Device , The PCL Device , See The Printer Device , The PostScript Device )
Set the PORTRAIT keyword to generate plots using portrait orientation. Portrait orientation is the default. Note that explicitly setting PORTRAIT=0 is the same as setting the LANDSCAPE keyword.
If the current device is PRINTER, and a page is open in the printer, it is closed and a new page set to portrait layout is started.
Set this keyword to add a "device independent screen preview" to the PostScript output file, in encapsulated PostScript interchange format (EPSI). Use this keyword only with encapsulated output. Many, but certainly not all, desktop publishing and word processing programs will display this screen preview when the file is imported into a document. The preview is only a crude approximation and does not include all elements of the final PostScript output. This feature is not available under VMS.
( The Microsoft Windows Device )
Set this keyword to the name of a file (e.g., PostScript or PCL) to be sent to the currently-selected Windows printer. IDL performs no type checking on this file before sending it to the printer. Therefore, if you have a PostScript printer selected and you send a file that contains no valid PostScript information, you'll simply get text output.
To send the file MYFILE.PS to the currently-selected Windows printer, enter:
( The Macintosh Display Device , The X Windows Device )
If this keyword is present, the PseudoColor visual is used. The value of the keyword represents the number of bits per pixel to be used. This keyword has effect only if no windows have been created. Visual classes are discussed in more detail in X Windows Visuals
The string used to place the terminal back into the normal interactive mode after drawing graphics. Use this parameter, in conjunction with the SET_STRING keyword, to control the mode switching of your terminal.
For example, the GraphON 200 series terminals require the string <ESC>2 to activate the alphanumeric window after drawing graphics. The call to set this is:
DEVICE, RESET = string(27b) + '2'
If the 4100 series mode switch is set, using the keyword TEK4100, the default mode resetting string is <ESC>%!1 , which selects the ANSI code mode.
( The LJ Device , The PCL Device )
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
Use this keyword to specify the default method used for backing store when creating new windows. This is the method used when the RETAIN keyword is not specified with the WINDOW procedure. Backing store is discussed in more detail under Backing Store The possible values for this keyword are summarized in Allowed Values for the RETAIN Keyword . If RETAIN is not used to specify the default method, method 1 (server-supplied backing store) is used.
The initial value of this parameter can be set by selecting File-Preferences from the menu bar. Backing Store
On some systems, when backing store is provided by the window system (RETAIN=1), reading data from a window using TVRD may cause unexpected results. For example, data may be improperly read from the window even when the image displayed on screen is correct. Having IDL provide the backing store (RETAIN=2) ensures that the window contents will be read properly. These types of problems are described in more detail in the documentation for TVRD. Unexpected Results Using TVRD with X Windows
( See The Printer Device , The PostScript Device )
Specifies a scale factor applied to the entire plot. The default value is 1.0, allowing output to appear at its normal size. SCALE_FACTOR is used to magnify or shrink the resulting output.
The SCALE_FACTOR keyword behaves slightly differently in the context of the PRINTER device than it does in the context of the PS device.
When the current device is PRINTER, the SCALE_FACTOR keyword is designed to emulate a scalable resolution setting on the printer. For example, if you have a 300 x 300 pixel image--stored in the variable image --the following IDL commands will print image in a 0.5 inch square on a 600 dpi printer:
Setting SCALE_FACTOR to 2 will scale the image to a 1 inch square on the same 600 dpi printer:
The output of IDL's Direct Graphics routines (CONTOUR, PLOT, SURFACE, etc.) is automatically scaled to fill the available drawing area. As a result, the following IDL commands will produce two identical copies of the same output on any printer:
( The CGM Device , The HP-GL Device , The LJ Device , The Macintosh Display Device , The PCL Device , See The Printer Device , The PostScript Device , The Regis Terminal Device , The Tektronix Device , The Microsoft Windows Device , The X Windows Device , The Z-Buffer Device )
Set this keyword equal to a two-element vector to specify the font size and line spacing (leading) of vector and TrueType fonts, and the line spacing of device fonts. The way that the value of this vector determines character size is not completely intuitive.
The vector specified to the SET_CHARACTER_SIZE keyword sets the values of the X_CH_SIZE and Y_CH_SIZE fields in the structure. These values describe the size of the rectangle that contains the "average" character in the current font. (It is not important what the "average" character is; it is used only to calculate a scaling factor that will be applied to all of the characters in the font.) The first element specifies the width of the rectangle in device units (usually pixels), and the second element specifies the height.
For vector and TrueType fonts, the height of the "average" character is determined by the width of the rectangle. The aspect ratio of the "average" character remains fixed; the character is scaled so that its width fits in the specified rectangle. The resulting scale factor is then applied to all of the characters in the font. The amount of spacing between lines (baseline to baseline) is determined explicitly by the height of the rectangle.
For device fonts, the character size is fixed. When the device font system is in use, the first element of the vector specified to SET_CHARACTER_SIZE is silently ignored, and only the line-spacing value is used.
( The PCL Device )
Set this keyword to a 14,739 (= 3 17 3 ) element byte vector containing the RGB-to-printer color translation table for a color PCL printer. The default table is for an HP Deskjet 500C printer.
The translation table is divided into red, green, and blue planes of 4913 (=17 3 ) elements each. For a given RGB triple, the offset into each plane is calculated as follows:
Offset = (Red/16)*289 + (Green/16)*17 + (Blue/16)
Thus, if the RGB triple is [16,32,160], the offset into each plane is 333. The printer will use the value at element 332 of the translation table as the red value, the value at element 5245 (=4913+332) as the green value, and the value at element 10158 (=9826+332) as the blue value.
The following example shows how to scale an existing colortable for use by a PCL printer.
SET_PLOT, 'X' ; Set the plot window to the X device.
WINDOW,0,XS=300,YS=300 ; Create a window.
LOADCT,13 ; Load a color table.
TVLCT,r,g,b,/GET ; Read color table values into variables.
r2=CONGRID(r,4913) ; Re-size color table variables.
colormap=[r2,g2,b2] ; Create 14,739-element color map.
SET_PLOT, 'PCL' ; Change to the PCL device.
DEVICE, FILE = 'pcl.pcl', RESOLUTION = 300, $
/COLOR, SET_COLORMAP = colormap
;
Set file name, resolution, color, and color map.
Sets the number of pixel values, !D.N_COLORS and !D.TABLE_SIZE. This value is used by a number of IDL routines to determine the scaling of pixel data and the default drawing index. Allowable values range from 2 to 256, and the default value is 256. Use this parameter to make the Z-buffer device compatible with devices with fewer than 256 colors indices.
( The Macintosh Display Device , See The Printer Device , The PostScript Device , The Microsoft Windows Device , The Z-Buffer Device )
Set this keyword to a scalar string specifying the name of the font used when a hardware or TrueType font is selected. Note that hardware fonts cannot be rotated, scaled, or projected, and that the "!" commands for formatting may not work. When generating three-dimensional plots, it is best to use the vector-drawn or TrueType characters. Note that for the PS device, only one hardware font (other than the predefined fonts set via the fontname keywords, such as /AVANTEGARDE) may be loaded at a time.
The SET_FONT keyword was introduced with IDL version 5.1 and replaces the FONT and USER_FONT keywords used in previous versions.
For TrueType fonts, the specified font name must exactly match one of the names in the first column of the
ttfont.map
file in the
resource/fonts/tt
directory or (on Macintosh and Windows platforms)the name of an installed font. See
for details on the
ttfont.map
file and for a listing of TrueType fonts distributed with IDL. Note that you must include the TT_FONT keyword to indicate that the font specified is a TrueType font. For example, the following sets the font to the font to the TrueType font Helvetica Bold Italic:
DEVICE, SET_FONT='Helvetica-BoldItalic', /TT_FONT
NOTE:
You can append additional TrueType fonts to the
ttfont.map
file if desired; on Macintosh and Windows platforms, additional fonts can also be added via the normal font installation procedures for your system. Research Systems cannot guarantee that TrueType fonts you add will be satisfactorily tessellated or displayed. See
for details.
Because device fonts are specified differently on different platforms, the synatax of the fontname string depends on which platform you are using.
Usually, the window system provides a directory of font files that can be used by all applications. List the contents of that directory to find the fonts available on your system. The size of the font selected also affects the size of vector drawn text. X Windows users can use the xlsfonts command to list available X Windows fonts.
On some machines, fonts are kept in subdirectories of
/usr/lib/X11/fonts
.
The SET_FONT keyword should be set to a string with the following form:
DEVICE, SET_FONT=" font * modifier 1 * modifier 2 *... modifier n "
where the asterisk (*) acts as a delimiter between the font's name ( font ) and any modifiers. The string is not case sensitive. Modifiers are simply "keywords" that change aspects of the selected font. Valid modifiers are:
For example, if you have Garamond installed as one of your Windows fonts, you could select 24-pixel cell height Garamond italic as the font to use in plotting. The following commands tell IDL to use hardware fonts, change the font, and then make a simple plot:
DEVICE, SET_FONT = "GARAMOND*ITALIC*24"
PLOT, FINDGEN(10), TITLE = "IDL Plot"
This feature is compatible with TrueType and Adobe Type Manager (and, possibly, other type scaling programs for Windows). If you have TrueType or ATM installed, the TrueType or PostScript outline fonts are used so that text looks good at any size.
The SET_FONT keyword should be set to a string with the following form:
DEVICE, SET_FONT=" font * modifier 1 * modifier 2 *... modifier n "
where the asterisk (*) acts as a delimiter between the font's name ( font ) and any modifiers. The string is not case sensitive. Modifiers are simply "keywords" that change aspects of the selected font. Valid modifiers are:
For example, if you have Garamond installed, you could select 24-point Garamond italic as the font to use in plotting. The following commands tell IDL to use hardware fonts, change the font, and then make a simple plot:
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device , The Z-Buffer Device )
Most window systems allow applications to specify the graphics function. This is a logical function which specifies how the source pixel values generated by a graphics operation are combined with the pixel values already present on the screen. The complete list of possible values is given in Graphic Function Codes . The default graphics function is GXcopy, which causes new pixels to completely overwrite any previous pixels. Not all functions are available on all window systems.
For example, the following code segment inverts the bottom bit in the rectangle defined by its diagonal corners ( x 0 , y 0 ) and ( x 1 , y 1 ):
DEVICE, GET_GRAPHICS_FUNCTION = oldg, SET_GRAPHICS_FUNCTION = 6
;
Set graphics function to exclusive or (GXor), and save the old function.
POLYFILL, [[x0,y0], [x0,y1], [x1,y1], [x1,y0]], $
/DEVICE, COLOR=1; Use POLYFILL to select the area to be inverted. The source pixel value is 1.
DEVICE, SET_GRAPHICS_FUNCTION=oldg ; Restore the previous graphics function.
Set this keyword to a two-element vector that specifies the width and height of the Z-buffers. The default size is 640 by 480. If this size is not the same as the existing buffers, the current buffers are destroyed and the device is reinitialized.
The string used to place the terminal into the graphics mode from the normal interactive terminal mode. If the 4100 series mode switch is set, using the keyword TEK4100, the default graphic mode setting string is <ESC>%!0 , which selects the Tektronix code mode.
This keyword can be used to allow multiple, simultaneous IDL sessions to use the same colors from a shared colormap. Use this keyword before the X connection is established (i.e., before a window is created), IDL will use the shared color map without allocating any additional colors, and will not load a grayscale ramp as is usually done when the X server starts up. The following example shows two cooperating IDL processes sharing the same colormap:
Execute the following commands in the first IDL session:
WRITEU, 1, a, !D.N_COLORS, t[0:!D.N_COLORS-1]
( The X Windows Device , The Z-Buffer Device )
Sets the write mask to the specified value. For an n -bit system, the write mask can range from 0 to 2 n -1.
Use this keyword to select the X Windows StaticColor visual. The value of the keyword represents the number of bits per pixel to be used. This keyword has effect only if no windows have been created. Visual classes are discussed in more detail in X Windows Visuals
Use this keyword to select the X Windows StaticGray visual. The value of the keyword represents the number of bits per pixel to be used. This keyword has effect only if no windows have been created. Visual classes are discussed in more detail in X Windows Visuals
Set this keyword to specify that coordinates are to be output with full 12-bit resolution. If this keyword is not present or is zero, 10-bit coordinates are output. Normally, IDL sends 10-bit coordinates. 12-bit coordinates are compatible with most terminals, even those without the full resolution, but require more characters to send.
Set this keyword to indicate that the terminal is a 4100 or 4200 series terminal. The use of color, ANSI and Tektronix mode switching, hardware line styles, and pixel output with the TV procedure is supported with these terminals. Also, text is output differently.
( The LJ Device , The Macintosh Display Device , The PCL Device , The X Windows Device )
Set this keyword to select the threshold algorithm--the simplest dithering method. The value of this keyword is the threshold to be used. This algorithm simply compares each pixel against the given threshold, usually 128. If the pixel equals or exceeds the threshold the display pixel is set to white, otherwise it is black.
( The Macintosh Display Device , The Microsoft Windows Device , The X Windows Device )
As discussed in Shared Colormaps , using the shared colormap (normally recommended) causes IDL to translate between IDL color indices (which always start with zero and are contiguous) and the pixel values actually present in the display. The TRANSLATION keyword specifies the name of a variable to receive the translation vector. To read the translation table, use the command:
where TRANSARR is a named variable into which the translation array is stored. The result is a 256-element byte vector. Element zero of the vector contains the pixel value allocated for the first color in the IDL colormap, and so forth.
( The Macintosh Display Device , See The Printer Device , The X Windows Device )
Use this keyword to select TrueColor visuals. The value of the keyword represents the number of bits per pixel to be used. This keyword has effect only if no windows have been created. Visual classes are discussed in more detail in X Windows Visuals . If the current device is PRINTER, the printer is placed in RGB or true-color mode if the value of the TRUE_COLOR keyword is greater than zero (the number of bits per pixel specified is ignored.)
( The Macintosh Display Device , See The Printer Device , The X Windows Device , The X Windows Device , The Z-Buffer Device )
Set this keyword to indicate that the font set via the SET_FONT keyword (either to set the fontname or to retrieve fontnames in conjunction with the GET_FONTNAMES or GET_FONTNUM keywords) should be treated as a TrueType font.
( The Regis Terminal Device , The Tektronix Device )
Set this keyword to specify that output should be sent to the terminal at the same time that it is being sent to a file due to the FILENAME or PLOT_TO keywords. A zero value causes output to go only to the file. If no output file is in use, this keyword has no effect.
This keyword is now obsolete and has been replaced by the SET_FONT keyword. Code that uses the USER_FONT keyword will continue to function as before, but we suggest that all new code use SET_FONT.
( The CGM Device , The HP-GL Device , The LJ Device , The Macintosh Display Device , The PCL Device , See The Printer Device , The PostScript Device , The Regis Terminal Device , The Tektronix Device , The Microsoft Windows Device , The X Windows Device , The Z-Buffer Device )
Set this keyword to configure the REGIS device for VT240 series terminals.
( The Microsoft Windows Device , )
Set this keyword to a named variable that returns an array containing one element for each possible window. Array element i contains a 1 if window i is open, otherwise it contains a 0.
( The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device )
Specifies the X position, on the page, of the lower left corner of output generated by IDL. XOFFSET is specified in centimeters, unless INCHES is specified. Positioning Graphics Output
( The HP-GL Device )
If present and non-zero, XON_XOFF causes each output page to start with device control commands that instruct the plotter to obey xon/xoff (^S/^Q) style flow control. Specifying a value of zero stops the issuing of such commands. You should only use this keyword before any output has been generated.
Such handshaking is the default. To turn it off, use the command
Often, it is not necessary to tell the plotter to obey flow control because the printing facilities on the system handle such details for you, but it is usually harmless.
( The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device )
Specifies the width of output generated by IDL. XSIZE is specified in centimeters, unless INCHES is specified.
( The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device )
Specifies the Y position, on the page, of the lower left corner of output generated by IDL. YOFFSET is specified in centimeters, unless INCHES is specified. Positioning Graphics Output
( The HP-GL Device , The LJ Device , The PCL Device , The PostScript Device )
Specifies the height of output generated by IDL. YSIZE is specified in centimeters, unless INCHES is specified.
This keyword enables and disables the Z-buffering. If this keyword is specified with a zero value, the driver operates as a standard 2D device, the Z-buffering is disabled, and the Z-buffer (if any) is deallocated. Setting this keyword to one (the default value), enables the Z-buffering.