note | If you have a 24-bit display, use WgCeditTool and WzColorEdit instead of COLOR_PALETTE. |
note | The total number of colors that can appear in the COLOR_PALETTE window is 236, which reflects the current value of !D.N_Colors. The black cells in the upper-right corner of the window represent colors that are not available to PV-WAVE because they have been reserved by Windows. |
; Create an array containing the values for a sine function from
; 0 to 360 degrees.
b = FINDGEN(37)
x = b * 10
y = SIN(x * !Dtor)
; Plot data and set the range to be exactly 0 to 360.
PLOT, x, y, XRange=[0,360], XStyle=1, YStyle=1
; Put up window containing display of the current color table and
; its associated color indices.
COLOR_PALETTE
; Load a predefined color table that contains 32 distinct colors.
TEK_COLOR
; Fill in areas under the curve with different colors.
POLYFILL, x, y, Color=WoColorConvert(6)
POLYFILL, x, y/2, Color=WoColorConvert(3)
POLYFILL, x, y/6, Color=WoColorConvert(4)
; Create an array containing the values for a COS function from
; 0 to 360 degrees.
z = COS(x * !Dtor)
; Plot the cosine data on top of the sine data.
OPLOT, x, z/8, Linestyle=2, Color=WoColorConvert(5)
OPENR, lun, !Data_dir + 'head.img', /Get_lun
image = BYTARR(512, 512)
READU, lun, image
LOADCT, 0
TVSCL, image
COLOR_PALETTE
LOADCT, 5
LOADCT, 3