The View page of the 3D Plot Format dialog box lets you modify the general presentation of your plot.
To change your plot from a surface plot to another type of 3D plot, click on the appropriate button in the Display As group. You can convert any surface plot (except for parametric plots) into a contour plot or a 3D bar chart. These plot types are fully discussed in the corresponding chapters of this User’s Guide. You can also display just the points making up the surface without displaying the surface itself. To do so, click .on Data Points. You can change how the points look by using the Colors and Lines tab of this dialog box.
To change the perspective, or point of view, from which you see the surface of your plot, adjust the numbers in the Rotation and Tilt text boxes. Use an integer between 0 to 360 degrees. Figure 22-3 shows the effects of varying the rotation and tilt (as well as the scale) of a surface plot.
• Increasing the rotation turns the plot clockwise. When the rotation is set to 0, you look straight down the first column of the matrix. The first row of the matrix points to the right. When the rotation is set to 90, you look straight down the first row of the matrix. The first column points to the left.
• Increasing the tilt raises you higher above the plot’s surface. When the tilt is set to 0, you look edge on at the plane of the matrix. When the tilt is set to 90, you look straight down on the surface. Think of how a mountain range looks when you’re on the ground (tilt equals 0) and when you’re flying directly above (tilt equals 90).
To control how bumpy the plot looks, adjust the magnification of the vertical scale by changing the number in the Vert. Scale text box. This is an integer between 1 and 100. Wheh the vertical scale is small, the variations in height of the surface will be barely perceptible. At 100, the variations are shown at full scale. Figure 22-3 shows the effects of varying the scale (as well as the rotation and tilt) of a surface plot. To add or remove a border around the surface plot region, click on Show Border in the Frames group to add or remove a check. The border is a two-dimensional frame around the surface plot region.
To enclose the surface and the axes within a three-dimensional bounding box, click on Show Box in the Frames group to add a check. You can add back planes to your surface plots:
• To show the xy, xz, and yz back planes, click on “Show” in the Back Planes group.
• To color the surface of the back planes, click on “Fill Color.”
• To outline the edges of the back planes in a particular color, click on “Edge Color.”
A surface plot with a border around it and with back planes showing
and the same plot enclosed within a box without showing back planes
Changing the shading of the surface
You can often make a surface plot communicate more effectively by using different colors to represent different values of z. Alternatively, if you intend to print on a black and white printer, you can achieve a similar effect by using different shades of gray to represent the different values of z. Use the Color and Lines page of the 3D Plot Format dialog box.
To specify the shading of your plot, click the appropriate button in the Shading group:
• None: The surface won’t have any shading, regardless of where it is.
• Grayscale: The largest values of the matrix will be in white and the smallest values will be in black. Intermediate values will be in shades of gray.
• Color: The largest values of the matrix will be in red and the smallest values will be in blue. Intermediate values will range from yellow through green. The same surface plot displayed without shading and in grayscale.
If you’ve chosen to leave the surface without shading (“None”), you’ll be able to see through the surface as if it were transparent. Depending on the surface and on your viewpoint, you may find it distracting to see through the surface. When this happens, you may want to render the surface opaque. Note that this option is unnecessary when a surface is rendered in color or in shades of gray. Such surfaces are inherently opaque.
• To make the surface opaque, click Hidden Lines to add a check. Mathcad hides any lines that are behind the surface. Such a plot takes longer to draw since Mathcad has to determine which parts of the surface are concealed.
• To make the surface transparent, click Hidden Lines to remove the check.
If you uncheck Hidden Lines, the surface shows lines that are behind it. Such a plot will draw more quickly than iflines were hidden, but it may be more difficult to interpret. The upper two surface plots in Figure 22-5 show the same surface with and without
lines showing. By default, Mathcad overlays a mesh on colored and grayscale surfaces. The intersections of the lines making up this mesh correspond to the elements of the underlying matrix. Each patch created by this mesh gets a color corresponding to the value of the under! ying matrix element.
As the number of matrix elements increases, this mesh can become so dense that it begins to obscure the colors. When this happens you may want to hide the mesh. To do so, click Hide Mesh in the Fill Style group to add a check. Note that Hide Mesh is only available for colored and grayscale plots. Hiding the mesh of a plot that doesn’t have any shading would make that plot invisible. The lower two surface plots in Figure 22-5 show the same surface plot with the mesh showing and with it hidden.
By default, the patches making up the surface are free to tilt in whatever direction necessary to connect them to their neighboring patches. The result is a continuous surface. In this case, each point at which grid lines intersect is associated with a matrix element. This means that for an m x n matrix, there will be (m – 1)(n – 1) patches.
To constrain these patches to be horizontal, click Patch Plot in the Fill Style group for regular surface plots and Alternative Mesh for parametric surface plots to add a check. The resultant discontinuous surface shows a patch for each matrix element. This means that for an m x n matrix, there will be mn patches.
an example of the same matrix being plotted with Patch Plot checked and not checked.
Mathcad generates grid lines for surface plots by extending tick marks up and down the two back planes adjacent to a given axis. Thus, x-axis grid lines represent lines of constant x drawn on the xz plane and the xy plane, the two orthogonal planes whose intersections form the x-axis. The y-axis grid lines and z-axis grid lines are defined similarly .
Note that this makes it impossible to draw lines of constant x on only the xz plane. Clicking Grid Lines always results in grid lines being drawn on two of the three back planes.
To choose between using tick marks or grid lines on a selected axis, use the Grid Lines check box for that axis. When Grid Lines is checked, Mathcad will extend the tick marks on the selected axis into grid lines on each adjacent back plane. For example, checking this on the z-axis will result in lines of constant z on both the yz and the xz back planes. If you are showing grid lines, you should seriously consider showing back planes as well. See “Changing your view of the surface plot” an example of a surface plot that uses grid lines rather than tick marks.
To add or remove numbers for the tick marks on an axis, use the Numbered check box for that axis. The differences between having numbers on the tick ~arks and not having numbers.
You can have Mathcad automatically select the number of grid intervals on an axis or you can specify the number yourself. Grid intervals are the spaces between tick marks or grid lines.
• To have Mathcad select the number of grid intervals, use the Auto Grid check box. When Auto Grid is checked, Mathcad will automatically select the number of grid intervals on the specified axis.
• To specify the number of grid intervals on an axis yourself, enter an integer from 1 to 99 in the No. of Grids text box. This text box is only available when Auto Grid is unchecked.
By default, Mathcad autoscales the z-axis according to the range of values in the matrix you are plotting. Sometimes you will want to fix the scaling yourself, for example, if you are comparing views of related data or setting up a surface animation sequence. To set the z-axis limits manually, click on the Autoscale box in the z-axis column of the Axes page to uncheck it. Then enter the maximum and minimum values in the Max. Val. and Min. Val. text boxes.
Since a surface plot is made by plotting the elements of a matrix, Mathcad cannot “know” anything about x and y coordinates. By default, the coordinates on the x- and y-axes of a surface plot will simply be rows and columns. The Max. Val. and Min. Val. text boxes are therefore grayed out on the x- and y-axes for an ordinary surface plot. you’ve made a parametric surface plot, however, you will be able to modify the Max. Val. and Min. Val for all three axes.