Standard Library procedure thatfills both open and closed contours with specified colors or patterns.
z A 2D array used to generate the contour surface. This array is the same as the one used by CONTOUR.
x (optional) A vector specifying the x-coordinates used to generate the contours. This vector is the same as the one used by CONTOUR.
y (optional) A vector specifying the y-coordinates used to generate the contours. This array is the same as the one used by CONTOUR.
If not present, the contour colors span the range of available colors.
Delete_File If present, deletes filename after the CONTOURFILL procedure finishes.
Pattern A 3D array containing the patterns used to fill the various contour levels. Each pattern is an n-by-m rectangular array of pixels. (See the description of the Pattern graphics keyword in Chapter 3, Graphics and Plotting Keywords, for an example.)
If NP number of patterns are specified, Pattern will be dimensioned (n, m, NP). The patterns are used to fill the various contour levels. If there are more levels than patterns, the patterns will be cyclically repeated.
TIP: For best results, the XRange and YRange keywords used with CONTOURFILL should match the ones used with CONTOUR.
TIP: If you are plotting a large data set, use the EMPTY procedure to be sure that all buffered output is written to the current graphics device.
NOTE: CONTOURFILL creates a temporary file named filename+1, so you must have write permission in the directory where filename exists.
OPENR, 1, !Data_dir + 'pikeselev.dat' pikes = FLTARR(60, 40) READF, 1, pikes
TEK_COLOR
CONTOUR, pikes, Levels=[5,6,7,8,9,10,11,12,13,14,15]*1000, $ Path='path.dat', XStyle=1, YStyle=1
CONTOURFILL, 'path.dat', pikes, Color_Index=INDGEN(12)
Figure 2-19 Contour plot of Pike's Peak elevation filled with solid colors.
Figure 2-20 Contour plot of Pike's Peak elevation filled with solid colors.
pat1 = BYTARR(3, 3) pat1(1, *) = 255 pat1(*, 1) = 255
pat2 = BYTARR(3, 3) FOR i = 0, 2 DO pat2(i, i) = 255
pat3 = BYTARR(3, 3)
pat4 = REPLICATE(255b, 3, 3)
pat5 = BYTARR(3, 3) FOR i = 0, 2 DO pat5(2-i, i) = 255
pat3d = BYTARR(3, 3, 5)
pat3d(*, *, 0) = pat1 pat3d(*, *, 1) = pat2 pat3d(*, *, 2) = pat3 pat3d(*, *, 3) = pat4 pat3d(*, *, 4) = pat5
CONTOURFILL, 'path.dat', pikes, Pattern = pat3d, /Delete_File
Figure 2-21 Pattern-filled contour map of Pike's Peak elevation.
Figure 2-22 Pattern-filled contour map of Pike's Peak elevation.
TV, BYTSCL(array, Top=n)
In other words, the previous example could be displayed using the commands:
TEK_COLOR pikes=REBIN(pikes, 600, 400) TV, BYTSCL(pikes, Top = 10)