Standard Library procedure thatoverlays a contour plot onto an image display of the same array.
Interp
Window_Scale
.RUN FUNCTION f, x, y RETURN, x * SIN(y) + y * COS(x) - 10 * SIN(0.25 * x * y) END
x = FINDGEN(101)/5 - 10
; Create vector of
x
-coordinates.
y = x
; Create vector of
y
-coordinates.
z = FLTARR(101, 101)
; Create an array to hold the function values.
FOR i = 0, 100 DO FOR j = 0, 100 DO $ z(i, j) = f(x(i), y(j))
z
.
IMAGE_CONT, z
; Display image and contour plot.
Figure 2-51 Image and contour plot of (x,y) = xsin(y) + ycos(x) - 10sin(xy/4)
Figure 2-52 Image and contour plot of.
For details on methods of interpolation, see the PV-WAVE User's Guide.