SCr # # # # Immediately change the color representation for the specified color index. The first number is the color index and the following three numbers give the red, green, and blue color intensities and must lie in the range 0.0 to 1.0. This command only works on color devices for which the color representation can be changed.

For color indices 0-15, the color representation you set will become the new default for as long as you stay in PLT. This means the HArdcopy command will show the colors you have set (if the device is capable). To restore the original default colors use set the Red color value to NO and then reissue the cpd command. Thus to restore the default color representation of color index 2 on your default /xs device, use:


Note, for PostScript files, color index 0 is *anyways* transparent and thus the color of the paper. I.e., there is no way to change the background color (other than loading different color paper in the printer) for PostScript files. If you want to change the background color, use the /PNG device.


SCr [Black|White|Default] This allows PLT to override the default PGPLOT background color. In particular, /XS and /GIF devices produce white lines on a black background, whereas a PostScript hardcopy would be black lines on white paper. Thus

PLT> SCr White

will always force the background to be white. Note, SCr Black is not recommended as it would require white toner and black paper in order for it to work with PostScript devices. SCr Default restores the default behavior where PGPLOT picks the background color.


PLT> SCR 0 1. 1. 1.  ! Set the background color to be white
PLT> SCR 1 0 0 0     ! Plot color index 1 in black
PLT> SCR 2 0 1 0     ! Plot color index 2 in green

Return to plt main page.