WOLFRAM

ListPlot3D[{{f11,,f1n},,{fm1,,fmn}}]

generates a surface with height fij at position {j,i}.

ListPlot3D[{{x1,y1,f1},,{xk,yk,fk}}]

generates a surface with height fi at position {xi,yi}.

ListPlot3D[{data1,data2,}]

plots the surfaces corresponding to each of the datai.

Details and Options

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Use an array of values to define heights for a surface:

Out[1]=1

Give explicit , , coordinates for points on a surface:

Out[1]=1

Use different interpolations of data:

Out[2]=2
Out[3]=3

Scope  (29)Survey of the scope of standard use cases

General Data  (9)

For regular data consisting of values, the and data ranges are taken to be integer values:

Out[1]=1

Provide explicit and data ranges by using DataRange:

Out[1]=1

Plot multiple sets of regular data:

Out[1]=1

For irregular data consisting of triples, the and data ranges are inferred from data:

Out[2]=2

Plot multiple sets of irregular data:

Out[3]=3

Areas around where the data is nonreal are excluded:

Out[1]=1
Out[2]=2

Use MaxPlotPoints to limit the number of points used:

Out[2]=2

PlotRange is selected automatically:

Out[1]=1

Use PlotRange to focus in on areas of interest:

Out[2]=2

Use RegionFunction to restrict the surface to a region given by inequalities:

Out[2]=2

Tabular Data  (1)

Get tabular data:

Plot a shaded density plot of column f over columns x and y:

Out[2]=2

Plot multiple sets of columns as separate surfaces:

Out[3]=3

Include color swatch legends for the plot:

Out[4]=4

Special Data  (4)

Use Quantity to include units with the data:

Out[1]=1

Include different units for the x, y and z coordinates:

Out[2]=2

Plot data with uncertainty:

Out[2]=2

Plot data with uncertainty in x, y and z:

Out[2]=2

Labeling and Legending  (6)

Label surfaces with Labeled:

Out[5]=5

Label surfaces with PlotLabels:

Out[2]=2

Place the label near the surface at an {x,y} value:

Out[2]=2

Use Callout:

Out[3]=3

Place a label with specific locations:

Out[2]=2

Include legends for each surface:

Out[2]=2

Use Legended to provide a legend for a specific dataset:

Out[3]=3

Use Placed to change the legend location:

Out[4]=4

Presentation  (9)

Provide an explicit PlotStyle for the surface:

Out[1]=1

Provide separate styles for different surfaces:

Out[3]=3

Add labels:

Out[1]=1

Color the surface by height:

Out[1]=1

Provide overlay meshes:

Out[1]=1

Style the areas between mesh lines:

Out[1]=1

Provide an interactive Tooltip for a surface:

Out[1]=1

Fill below a surface:

Out[1]=1

Use plot theme:

Out[1]=1

Options  (114)Common values & functionality for each option

BoundaryStyle  (6)

Use a black boundary around the edges of the surface:

Out[1]=1

Use a thick boundary around the edges of the surface:

Out[1]=1

Use a thick red boundary around the edges of the surface:

Out[1]=1

Do not use any boundary:

Out[1]=1

BoundaryStyle applies to holes cut by RegionFunction:

Out[1]=1

BoundaryStyle applies where there are jumps in the surface:

Out[1]=1

ClippingStyle  (4)

By default clipped regions have no color:

Out[2]=2

Do not draw clipped regions:

Out[2]=2

Make clipped regions partially transparent:

Out[2]=2

Color clipped regions red at the bottom and blue at the top:

Out[2]=2

ColorFunction  (6)

Color by scaled , , and values:

Out[1]=1

Color by scaled and coordinates:

Out[1]=1

Use ColorData for predefined color gradients:

Out[1]=1

Named color gradients color in the direction:

Out[1]=1

ColorFunction has higher priority than PlotStyle:

Out[1]=1

ColorFunction has lower priority than MeshShading:

Out[1]=1

ColorFunctionScaling  (2)

Use unscaled coordinates:

Out[2]=2

Unscaled coordinates are dependent on DataRange:

Out[2]=2
Out[3]=3

DataRange  (5)

Arrays of height values are displayed against the number of elements in each direction:

Out[1]=1

Rescale to the sampling space:

Out[1]=1

Each dataset is scaled to the same domain:

Out[1]=1

Triples are interpreted as , , coordinates:

Out[2]=2

Force interpretation as arrays of height values:

Out[2]=2

The dataset is normally interpreted as a list of triples:

Out[3]=3

Filling  (5)

Fill to the bottom:

Out[1]=1

Filling occurs along the region cut by the RegionFunction:

Out[1]=1

Fill to both top and bottom:

Out[1]=1

Fill surface 1 to the bottom with blue and surface 2 to the top with red:

Out[1]=1

Fill below discrete regions:

Out[1]=1

FillingStyle  (3)

Fill to the bottom with a variety of styles:

Out[1]=1

Fill to the plane with red below and blue above:

Out[1]=1

Fill to the plane from above only:

Out[1]=1

InterpolationOrder  (5)

Points are normally joined with flat polygons:

Out[1]=1

Use zero-order or piecewise-constant interpolation:

Out[1]=1

Use third-order spline interpolation to fit the data:

Out[1]=1

Interpolation order 0 to 5:

Out[1]=1

For irregular data, zero-order interpolation gives Voronoi regions for each point:

Out[2]=2
Out[3]=3

IntervalMarkers  (2)

Interval markers are bars by default:

Out[2]=2

Use named IntervalMarkers:

Out[2]=2

IntervalMarkersStyle  (2)

Interval markers are black by default:

Out[2]=2

Specify a style for the bars using IntervalMarkersStyle:

Out[2]=2

LabelingSize  (2)

Textual labels are shown at their actual sizes:

Out[3]=3

Specify a maximum size for textual labels:

Out[5]=5

Image labels are automatically resized:

Out[2]=2

Specify a maximum size for image labels:

Out[3]=3

Show image labels at their natural sizes:

Out[4]=4

MaxPlotPoints  (4)

ListPlot3D normally uses all of the points in the dataset:

Out[1]=1
Out[3]=3

Limit the number of points used in each direction:

Out[1]=1

MaxPlotPoints imposes a regular grid on irregular data:

Out[2]=2

The grid does not extend beyond the convex hull of the original data:

Out[2]=2

Mesh  (7)

Use no mesh:

Out[1]=1

Show the initial and final sampling mesh:

Out[2]=2

The entire mesh for irregular data is a Delaunay triangulation:

Out[2]=2

Use 5 mesh lines in each direction:

Out[1]=1

Use 3 mesh lines in the direction and 6 mesh lines in the direction:

Out[1]=1

Use mesh lines at specific values:

Out[2]=2

Use different styles for different mesh lines:

Out[2]=2

MeshFunctions  (3)

Use the value as the mesh function:

Out[1]=1

Use mesh lines in the and directions:

Out[1]=1

Use mesh lines corresponding to fixed distances from the origin:

Out[1]=1

MeshShading  (4)

Use None to remove regions:

Out[1]=1

Lay a checkerboard pattern over a surface:

Out[1]=1

MeshShading has a higher priority than PlotStyle:

Out[1]=1

MeshShading has a higher priority than ColorFunction:

Out[1]=1

MeshStyle  (2)

Use red mesh lines:

Out[1]=1

Use red mesh lines in the direction and thick mesh lines in the direction:

Out[1]=1

NormalsFunction  (4)

Normals are automatically calculated:

Out[1]=1

Use None to get flat shading for all the polygons:

Out[1]=1

Vary the effective normals used on the surface:

Out[1]=1

VertexNormals has a higher priority than NormalsFunction:

Out[1]=1

PerformanceGoal  (2)

Generate a higher-quality plot:

Out[2]=2

Emphasize performance, possibly at the cost of quality:

Out[2]=2

PlotLabels  (3)

Specify text to label surfaces:

Out[7]=7

Specify a label at a position:

Out[1]=1

Specify labels to identify surfaces:

Out[1]=1

PlotLegends  (5)

Use placeholders to identify plot styles:

Out[2]=2

Use specific labels:

Out[1]=1

Use Placed to control legend position:

Out[1]=1

Use SwatchLegend to change the appearance:

Out[1]=1

Create a legend based on a color function:

Out[1]=1

Use BarLegend to change the appearance:

Out[1]=1

PlotRange  (3)

Automatically compute the range:

Out[1]=1

Use all points to compute the range:

Out[1]=1

Use an explicit range to emphasize features:

Out[1]=1

PlotStyle  (6)

Plot two surfaces with different styles:

Out[1]=1

Color a surface with diffuse purple:

Out[1]=1

Use Specularity to get highlights:

Out[1]=1

Use Opacity to get transparent surfaces:

Out[1]=1

Use separate styles for each of the surfaces:

Out[3]=3

Produce a wire mesh:

Out[1]=1

PlotTheme  (4)

Use a theme with simple ticks and grid lines in a bright color scheme:

Out[1]=1

Change the color scheme:

Out[1]=1

Change the appearance by modifying Mesh and MeshShading:

Out[1]=1

Create a thick surface for 3D printing:

Out[1]=1

RegionFunction  (5)

Plot over a region in :

Out[1]=1

The region depends on DataRange:

Out[2]=2
Out[3]=3

Filling will fill from the region boundary:

Out[1]=1

Regions do not have to be connected:

Out[1]=1

Use any logical combination of conditions:

Out[1]=1

ScalingFunctions  (9)

By default, plots have linear scales in each direction:

Out[1]=1

Use a log scale in the direction:

Out[1]=1

Use a linear scale in the direction that shows smaller numbers at the top:

Out[1]=1

Use a reciprocal scale in the direction:

Out[1]=1

Use different scales in the and directions:

Out[1]=1

Reverse the axis without changing the axis:

Out[1]=1

Use a scale defined by a function and its inverse:

Out[1]=1

Positions in Ticks and FaceGrids are automatically scaled:

Out[1]=1

PlotRange is automatically scaled:

Out[1]=1

TextureCoordinateFunction  (4)

Textures use scaled and coordinates by default:

Out[1]=1

Use the and parameters:

Out[1]=1

Use unscaled coordinates:

Out[1]=1

Use textures to highlight how parameters map onto a surface:

Out[1]=1
Out[2]=2

TextureCoordinateScaling  (1)

Use scaled or unscaled coordinates for textures:

Out[1]=1
Out[2]=2

VertexColors  (3)

ListPlot3D normally uses an uncolored surface:

Out[2]=2

Specify random colors for each vertex:

Out[3]=3

Specify colors for multiple datasets:

Out[3]=3

VertexNormals  (3)

ListPlot3D automatically computes surface normals from the geometry:

Out[2]=2

Specify random normals for each vertex:

Out[3]=3

Specify normals for multiple datasets:

Out[3]=3

Applications  (5)Sample problems that can be solved with this function

Plot an indexed family for functions:

Out[2]=2

Show iterates of the logistic map, emphasizing values at similar steps:

Out[1]=1

Show iterates of the logistic map, emphasizing values for particular initial values:

Out[2]=2

Plot ClebschGordan coefficients as a function of and :

Out[1]=1

A square pulse and its discrete Fourier transform:

Out[2]=2

Show a color elevation map of the state of Colorado by using elevation data from cities:

Out[1]=1

Properties & Relations  (15)Properties of the function, and connections to other functions

ListPlot3D produces an interpolating function surface:

Out[2]=2
Out[4]=4

ListSurfacePlot3D produces an approximating general surface:

Out[2]=2

ListPlot3D constructs a function surface that oscillates rapidly in the direction:

Out[3]=3

When using multiple values for each , value, the duplicates are discarded by ListPlot3D:

Out[5]=5

ListSurfacePlot3D still reconstructs the general surface:

Out[6]=6

ListPlot3D associates values, normals, and colors with the vertices of polygons:

Out[1]=1
Out[2]=2

Raster, ArrayPlot, MatrixPlot, and ReliefPlot associate values with the whole polygon:

Out[3]=3
Out[4]=4

Use Plot3D for functions:

Out[1]=1

Use ListPointPlot3D to show three-dimensional points:

Out[1]=1

Use ListLinePlot3D to plot curves through lists of points:

Out[1]=1

Plot curves through rows of heights in a table:

Out[2]=2

Use ListContourPlot to create contours from continuous data:

Out[1]=1

Use ListDensityPlot to create densities from continuous data:

Out[1]=1

Use ArrayPlot for arrays of discrete data:

Out[1]=1

Use MatrixPlot for structural plots of matrices:

Out[1]=1

Use ReliefPlot for matrices corresponding to medical and geographic values:

Out[1]=1

Use ListLogPlot, ListLogLogPlot, and ListLogLinearPlot for logarithmic plots:

Out[1]=1

Use ListPolarPlot for polar plots:

Out[1]=1

Use DateListPlot to show data over time:

Out[1]=1

Use ParametricPlot3D for three-dimensional parametric curves and surfaces:

Out[1]=1

Possible Issues  (2)Common pitfalls and unexpected behavior

The appearance of a plot may depend on the source of the data:

Out[1]=1
Out[2]=2

An ×3 matrix is by default interpreted as a list of triples:

Out[1]=1
Out[2]=2

Use DataRange->All to force interpretation as a matrix of values:

Out[3]=3

Or provide an explicit list of data ranges to force interpretation as a matrix of values:

Out[4]=4

Neat Examples  (2)Surprising or curious use cases

Voronoi region interpolation:

Out[1]=1

Use an image from ExampleData:

Plot the dataset with vertex colors, simulating the texture:

Out[2]=2
Wolfram Research (1988), ListPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListPlot3D.html (updated 2025).
Wolfram Research (1988), ListPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListPlot3D.html (updated 2025).

Text

Wolfram Research (1988), ListPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListPlot3D.html (updated 2025).

Wolfram Research (1988), ListPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListPlot3D.html (updated 2025).

CMS

Wolfram Language. 1988. "ListPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/ListPlot3D.html.

Wolfram Language. 1988. "ListPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/ListPlot3D.html.

APA

Wolfram Language. (1988). ListPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListPlot3D.html

Wolfram Language. (1988). ListPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListPlot3D.html

BibTeX

@misc{reference.wolfram_2025_listplot3d, author="Wolfram Research", title="{ListPlot3D}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ListPlot3D.html}", note=[Accessed: 25-March-2025 ]}

@misc{reference.wolfram_2025_listplot3d, author="Wolfram Research", title="{ListPlot3D}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ListPlot3D.html}", note=[Accessed: 25-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_listplot3d, organization={Wolfram Research}, title={ListPlot3D}, year={2025}, url={https://reference.wolfram.com/language/ref/ListPlot3D.html}, note=[Accessed: 25-March-2025 ]}

@online{reference.wolfram_2025_listplot3d, organization={Wolfram Research}, title={ListPlot3D}, year={2025}, url={https://reference.wolfram.com/language/ref/ListPlot3D.html}, note=[Accessed: 25-March-2025 ]}