Plots > 3D Plots > Example: Plotting a Function and a Matrix in 3D
  
Example: Plotting a Function and a Matrix in 3D
Create a 3D plot from a function and from a matrix of the function's values, and then compare the results.
Plotting a Function of Two Independent Variables
Plot a function of two independent variables where the result of the function represents the z-coordinates.
1. Define a function of two independent variables.
Click to copy this expression
2. Press Ctrl+3 to insert a 3D plot and type f in the axis expression placeholder.
Click to copy this expression
A function of two independent variables is plotted as a surface.
3. Change the y-axis tick marks to show the range (5, 20), and change the Surface Fill and the Trace Color.
Click to copy this expression
4. Delete each tick mark value that you edited to restore the default tick mark values.
Click to copy this expression
Plotting a Matrix Created from a Function
1. Use the matrix built-in function to create a data set based on the above function.
Click to copy this expression
2. Plot the matrix and change the Surface Fill and the Trace Color.
Click to copy this expression
This plot displays the values of the function from 0 through 9 for the x-axis and for the y-axis.
3. Change the tick marks of the y-axis to show the range (5, 20).
Click to copy this expression
The plot displays a range wider than the matrix limits. The plot does not display values that are outside the matrix limits.