To illustrate the simplicity of the graphics facilities let us make some plots. First we generate an array of Hanning function values:
WAVE> y = hanning(100)For one dimension, the result of
hanning is determined by the
following equation:

where n is the total number of elements described by the length of the array. The resultant array has zeros around the sides and rises to a peak in the center. In PV-WAVE you draw the graph by
WAVE> plot, yWe omit the picture as we will include another graph to it. A Hilbert transform is a series of numbers in which all periodic components have been phase-shifted by 90 degrees. PV-WAVE has a built-in procedure
hilbert to perform this
task. We apply it to our array y, draw the result together with
the graph of the original array (by overplotting with
oplot in a different linestyle), and add legends.
WAVE> oplot, hilbert(y), linestyle=4 WAVE> oplot, [20,30], [0.05,0.05], linestyle=4 WAVE> oplot, [20,30], [0.15,0.15] WAVE> xyouts, 35, 0.05, '!17hilbert(y)', charsize=1 WAVE> xyouts, 35, 0.15, '!17y=hanning(100)', charsize=1

In the second example we make several plots of the formula

First we create an array x, set x equal to y, and store the result in the variable z.
WAVE> x = findgen(101)/5-10 WAVE> y=x WAVE> z = fltarr(101,101) WAVE> for i=0, 100 do begin & z(i,*) = x(i)*sin(y)+y*cos(x(i))We draw a
shaded surface
WAVE> shade_surf, z

contour plot
WAVE> contour, z, nlevels=20

3 views in one picture
WAVE> show3, z
