# 3D Scatter Plots MathCad Help

Creating a 3D scatter plot

Scatter plots allow you to plot an arbitrary collection of points in a three-dimensional space. This is particularly useful for such tasks as identifying data clusters or tracing a trajectory of a point. Scatter plots differ from all other 3D plots as follows:

• In all other 3D plots, you create a matrix in which the rows and columns correspond to x and y coordinates and the value of the matrix element is the corresponding z coordinate.
• In scatter plots, you create three vectors with as many elements as there are points to plot. The x, y, and z coordinates of a point go into the three elements of the corresponding vectors.

Unlike other 3D plots, you can easily have several z values corresponding to the same x and y value. This is often necessary in statistical applications in which you take the same measurement more than once. You can also easily create parametric curves through a three-dimensional space since the indices of the vectors are themselves natural parameters to use.

To create a 3D scatter plot:
• Define three vectors, each having as many elements as you have points to plot. Each vector contains either the x, y, or z coordinates of all the points.
• Choose Graph=>3D Scatter Plot from the Insert menu. Mathcad shows a box with a single placeholder as shown below

• Type the names of the vectors, separated by commas, in the placeholder. Just as with an equation, Mathcad will not process the scatter plot until you click outside the region.

If you have a matrix of rows and columns corresponding to the x and y coqrdiuates that you want to show as a set of points, create a surface plot, double-click on it to bring up the 3D Plot Format dialog box, and select Data Points in the Display As group on the View page. See “Changing your view of the surface plot

Resizing scatter plots

To change the size of a scatter plot, follow these steps:
• Click in the scatter plot to select it.
• Move the mouse pointer to one of the three handles along the edge of the scatter plot. The pointer will change to a double-headed arrow.

• A Press and hold down the mouse button. While holding down the button, move the mouse. The scatter plot will stretch in the direction of motion.
• Once the scatter plot is the right size, let go of the mouse button.
• Click outside the scatter plot to deselect it.

Posted on November 20, 2015 in 3D Scatter Plots

Back to Top
Share This