Use three-dimensional plots to visualize a function of two variables, a vector-valued function, or a 3D data set.
Watch this video to learn more about plotting in 3D:
Input Data for 3D Plots
The 3D plots accept the following data types:
• A function of two variables
• A vector-valued function of either one or two parameters with three elements defining the x-,y-, and z-coordinates
• A 3-column matrix, where the three columns represent the x-, y-, and z-coordinates
• A m*n matrix, where the cell’s indices represent the x- and y-coordinates and the cell values represent the z coordinates
• A vector of three vectors, representing the x-, y-, and z-coordinates, as given by the output of the CreateSpace function
• A vector of three nested matrices, representing the x-, y-, and z-coordinates, as given by the output of the CreateMesh function
3D Plot Styles
You can plot the following trace types:
• Surfaces, where nodes are connected into a mesh
• Curves, which are similar to 2D plots but displayed in a 3D space
• Scattered data, where only points are displayed
You can switch from a surface or a curve to scattered data by formatting the plot style.
Controlling the Axis Ranges
The default range for all axes of a newly inserted 3D plot is -10 to 10. When you type a function, a matrix, or a vector inside the axis expression placeholder, the axis ranges change automatically to accommodate the plotting of all data points.
After selecting an axis on the axis selector, you can change the range of any axis by editing one or more of its tick mark values:
• Lower limit tick mark
• Interval tick mark
• Upper limit tick mark
When you plot a two-variable function that defines the z-value of a surface, you can control the plotted ranges by editing the tick mark values, by defining range variables above the plot, or by using CreateSpace or CreateMesh.
When you plot a vector-valued function, you must specify range variables above the plot to control the limits of the minimum and maximum plotted ranges.
You cannot plot singularities. If the range that you are plotting contains a singularity, you should choose the points that you are plotting in such a way as to avoid the singularity.
Zooming In and Out, Panning, and Spinning
You can control the plot view using the view control. You can zoom in and zoom out, pan across a plot, and spin it. You can also reset the view to its initial state.