User Guide > Displaying 2D Data > Customizing Plots with Keyword Parameters
  

Customizing Plots with Keyword Parameters
The plotting procedures are designed to produce acceptable results for most applications with a minimum amount of effort. The plotting and graphics keyword parameters and system variables, which are described in Chapter 22: System Variables in the PV‑WAVE Reference, allow you to customize your graphics output. Examples in this chapter show how to use many of the major keywords and system variables used to modify 2D graphics.
Keyword Correspondence with System Variables
Many of the plotting keyword parameters correspond directly to fields in the system variables !P, !X, !Y, !Z, or !PDT. When you specify a keyword parameter name and value in a call, that value affects only the current call — the corresponding system variable field is not changed. Changing the value of a system variable field changes the default for that particular parameter and remains in effect until explicitly changed. The system variables and the corresponding keywords that are used to modify graphics are described in Chapter 21: Graphics and Plotting Keywords and Chapter 22: System Variables in the PV‑WAVE Reference.
Example of Changing the Default Color Index
The color index controls the color of text, lines, axes, and data in 2D plots. By default, the color index is set in the !P.Color field of the !P system variable. This default value is normally set to the number of available colors minus 1. (If your system supports 256 colors, !P.Color is set to 255 by default.)
Using the Color Keyword Parameter
You can override this default value at any time by including the Color keyword in the graphics routine call. For example, to set the color of a plot to color index 12, enter:
PLOT, X, Y, Color = 12
Because keyword parameters only modify the current function or procedure call, future plots are not affected.
Changing the !P.Color System Variable
To change the color for all plots produced during the current session, you can modify !P.Color. For example, to change the default color index to 12, enter:
!P.Color = 12
Interpretation of the Color Index
The interpretation of the color index varies among the devices supported by PV‑WAVE. With color video displays, this index selects a color (normally an RGB triple) stored in a device table. You can control the color selected by each color index with the TVLCT procedure which loads the device color tables. TVLCT is described in the PV‑WAVE Reference.
Other devices have a fixed color associated with each color index. With plotters, for example, the correspondence between colors and color index is established by the order of the pens in the carousel.

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.