next up previous

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 z = x - y 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.

Figure 2 shows a traditional contour map of the function z = x - y. 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 3 shows a 2D raster map representation of the function z = x - y. 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 4 provides a wire frame surface plot of the function z = x - y. 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.