next up previous

3. Contours, Raster Maps and Surfaces

This section illustrates the use of plotmtv in viewing data sets of the form z = f(x,y) where x and y range over a rectangular mesh. The following code, cont.f illustrates the construction of an MTV data file containing the information necessary to plot the function over the region 0 < x,y < 5.

Compile and run Code 2, then experiment with different choices of values for contstyle and number of contours.

Click here to have plotmtv plot contours.

Figure 2 shows a traditional contour map of the function . It was created using the command line options -pfg BLACK -pbg GRAY. Use the 2D/3D toggle, (left click in the box 2D Plot or 3D Plot) to view a stacked contour map of this function. It does not appear to be possible to change the color of contour lines using the present version of plotmtv.

Figure 2 Plot from Code 2 with contstyle=1 and nsteps=20

Figure 3 shows a 2D raster map representation of the function . It was created using the command line options -pfg BLACK -pbg WHITE. Again, use the 2D/3D toggle to view a colored surface map of the function. In 3D display mode both the height of the surface and the color of the surface represent the value of the function at a given point. While in 3D mode, left click on the boxes labeled Left, Right, Up and Down to obtain different views of the data set.

Figure 3 Plot from Code 2 using contstyle=2 and nsteps=20

Figure 4 provides a wire frame surface plot of the function . As with Figure 3, the plot can be rotated and tilted to obtain different viewpoints. Use the toggle Wire Frame/Hidden Lines to switch between a wire frame display and an opaque surface display.

Figure 4 Plot from Code 2 with contstyle=3 and nsteps=20