The ERASE procedure erases the screen of the currently selected graphics device (or starts a new page if the device is a printer). The device is reset to alphanumeric mode if it has such a mode (e.g., Tektronix terminals).


Display a simple image in the current window, then erase it:

TV, DIST(255)
; Erase the image from the window:

If the current display device uses decomposed color, the following will erase the screen using green, then plot in blue:

ERASE, '00FF00'x

With the plot still on screen, the following command will change just the green channel:

ERASE, '003300'x, CHANNEL=2


ERASE [, Background_Color] [, CHANNEL=value] [, COLOR=value]



The color index or 24-bit color value to which the screen will be erased. If this argument is omitted, ERASE resets the screen to the default background color stored in the system variable !P.BACKGROUND. Providing a value for Background_Color overrides the default.

If the display device supports 24-bit color, Background_Color can be a 24-bit integer color specification. When specifying a 24-bit color, the DECOMPOSED keyword to the DEVICE routine should be set equal to 1; if DECOMPOSED=0, the lower 8 bits of the color are used to index the current color table to determine the erase color.

Note: 24-bit color values are commonly represented using hexadecimal notation. Generally speaking, a 24-bit color specification to ERASE takes the form 'BBGGRR'x; in this scheme, a pure red is represented '0000FF'x and a pure blue 'FF0000'x.

Note: Not all devices have the ability to erase to a specific background color.



The channel or channel mask for the erase operation. This parameter has meaning only when used with devices that support TrueColor or multiple-display channels. The default value is !P.CHANNEL.


Specifies the background color. Using this keyword is analogous to using the Background_Color argument.

Version History



See Also

SET_PLOT Procedure, WINDOW Procedure, WSET Procedure