TEK_COLOR Procedure
Standard Library procedure that loads a color table, which contains 32 distinct colors and is similar to the default Tektronix 4115 color table, into the display.
Usage
TEK_COLOR
Parameters
None.
Keywords
None.
Discussion
TEK_COLOR loads the first 32 elements of the color table with the Tektronix 4115 default color map. This creates a useful color table if you desire distinctive colors.
Example 1
; Create array containing 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
; Load a predefined color table that contains 32 distinct colors.
TEK_COLOR
; Display the current color table and its associated color indices.
COLOR_PALETTE
; 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 array containing values for 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)
Example 2
This example creates a contour plot of Pike’s Peak, with the area in between the contour lines filled with a solid color.
OPENR, 1, !Data_dir + 'pikeselev.dat'
pikes = FLTARR(60, 40)
; Read in the data file.
READF, 1, pikes
; Close any open contours.
CLOSE, 1
c_pikes = FLTARR(62, 42)
c_pikes(1, 1) = pikes
; Load a color table.
TEK_COLOR
WINDOW, /Free
; Produce a filled contour plot.
CONTOUR2, c_pikes, $
Levels=LINSPACE(11, 5000, 1000), $
C_Fillcolors=WoColorConvert(INDGEN(11)), $
XStyle=1, YStyle=1, /Fill
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.