MATHEMATICA HOW TO

How to | Plot Data in 3D

The integrated visualization capabilities of Mathematica provide many tools to show data in 3D. The ability to plot points, surfaces, and contours, combined with the interpolation power of Mathematica, results in accurate 3D visualizations. There are also many ways to customize and interact with these 3D plots that help you to better understand your data.

First, create datasets to plot in 3D. ExampleData is used to get the second set of data:

Use ListPointPlot3D to plot the list of 3D points given by :

 Out[3]=

Use the ColorFunction option with ListPointPlot3D to color the plot with a predefined gradient:

 Out[4]=

Use ListPlot3D to generate a 3D surface plot from :

 Out[5]=

Specifying mesh properties is one way to customize these plots. This example uses Mesh, MeshFunctions, MeshShading, and MeshStyle with ListPlot3D:

 Out[6]=

Use ListSurfacePlot3D to generate 3D surfaces from either set of data:

 Out[7]=
 Out[8]=

Use ListSurfacePlot3D to construct a 3D surface from , with restrictions on the number of points used in interpolation and the size of the mesh:

 Out[9]=

Use other mesh options available for ListSurfacePlot3D:

 Out[10]=

Mesh options are also available for ListContourPlot3D:

 Out[11]=

Mathematica also allows you to plot vector data in 3D.

Use ListVectorPlot3D to visualize vector data:

 Out[13]=

Plots in 3D integrate well with other Mathematica functions.

Use Manipulate with ListSurfacePlot3D to view an interactive 3D plot where you can adjust the size and color of the mesh. Using the mouse, you can rotate, zoom, and pan any of these plots just as you would any other 3D graphic. You must evaluate this example to see the result: