This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


generates a smooth density plot from an array of values.
generates a density plot with values defined at specified points.
  • ListDensityPlot[array] arranges successive rows of array up the page, and successive columns across.
  • ListDensityPlot linearly interpolates values so as to give smooth shading.
  • ListDensityPlot is mainly intended for discrete samplings of continuous data; ArrayPlot is intended for purely discrete data.
  • ListDensityPlot by default generates output in which larger values are shown lighter.
AspectRatio1ratio of height to width
BoundaryStyleNonehow to draw RegionFunction boundaries
BoxRatiosAutomaticeffective 3D bounding box ratios
ClippingStyleNonehow to draw values clipped by PlotRange
ColorFunctionAutomatichow to color the plot
ColorFunctionScalingTruewhether to scale the argument to ColorFunction
DataRangeAutomaticthe range of x and y values to assume for data
FrameTruewhether to draw a frame around the plot
FrameTicksAutomaticframe tick marks
InterpolationOrderNonethe polynomial degree in each variable of the interpolated density between data points
LightingAngleNoneeffective angle of the simulated light source
MaxPlotPointsAutomaticthe maximum number of points to include
MeshNonehow many mesh lines in each direction to draw
MeshFunctions{#1&,#2&}how to determine the placement of mesh lines
MeshStyleAutomaticthe style for mesh lines
MethodAutomaticthe method to use for interpolation and data reduction
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
PlotRange{Full,Full,Automatic}the range of f or other values to include
PlotRangePaddingAutomatichow much to pad the range of values
PlotRangeClippingTruewhether to clip at the plot range
RegionFunction(True&)how to determine whether a point should be included
VertexColorsAutomaticcolors to assume at every point
  • array should be a rectangular array of real numbers; holes will be left in the plot whenever there are elements that are not real numbers.
  • ListDensityPlot[array] by default takes the x and y coordinate values for each data point to be successive integers starting at 1.
  • The setting DataRange specifies other ranges of coordinate values to use.
  • ColorFunction is supplied with a single argument, given by default by the scaled value of f.
  • The setting for VertexColors must be an array or list with the same structure as the array or list of values.
Use an array of values to define heights for a density:
Give explicit , , coordinates for points in a density:
A larger set of , , samples:
Use different interpolations of data:
Use an array of values to define heights for a density:
Click for copyable input
Give explicit , , coordinates for points in a density:
Click for copyable input
A larger set of , , samples:
Click for copyable input
Click for copyable input
Use different interpolations of data:
Click for copyable input
Click for copyable input
For regular data consisting of values, the and data ranges are taken to be integer values:
Provide explicit and data ranges by using DataRange:
For irregular data consisting of , , triples, the and data ranges are inferred from data:
Areas around where the data is nonreal are excluded:
Use MaxPlotPoints to limit the number of points used:
PlotRange is selected automatically:
Use PlotRange to focus in on areas of interest:
Use RegionFunction to restrict the density to a region given by inequalities:
Add labels:
Color the density by height:
Provide overlay meshes:
Provide an interactive Tooltip for the density:
No boundary is used by default:
Use a red boundary around the edges of the surface:
BoundaryStyle applies to holes cut by RegionFunction:
BoundaryStyle applies where there are jumps in the surface:
Clipped regions are not shown by default:
Color clipped regions like the rest of the density:
Use pink to fill the clipped regions:
Use light red where the surface is clipped above and pink below:
Color by scaled coordinate:
Specify graylevel intensity by scaled coordinate:
Named color gradients color in the direction:
Use brightness to correspond to the height or density of a function:
Use the interpolation between two colors to indicate the height or density of a function:
Get the natural range of values by setting ColorFunctionScaling to False:
Arrays of height values are displayed against the number of elements in each direction:
Rescale to the sampling space:
Triples are interpreted as , , coordinates:
Force interpretation as arrays of height values:
The dataset is normally interpreted as a list of , , triples:
Densities are normally blended across polygons:
Use zero-order or piecewise constant interpolation:
Use third-order spline interpolation to fit the data:
Interpolation order 0 to 5:
For irregular data, zero-order interpolation gives Voronoi regions for each point:
ListDensityPlot normally uses all the points in the dataset:
Limit the number of points used in each direction:
MaxPlotPoints imposes a regular grid on irregular data:
The grid does not extend beyond the convex hull of the original data:
No mesh is used by default:
Show the initial and final sampling mesh:
The entire mesh for irregular data is a Delaunay triangulation:
Use 5 mesh lines in each direction:
Use 3 mesh lines in the direction and 6 mesh lines in the direction:
Use mesh lines at specific values:
Use different styles for different mesh lines:
Use the value as the mesh function, giving a continuously colored contour plot:
Use mesh lines in the and directions:
Show where the real and imaginary parts of a function are constant over the complex plane:
Mesh lines are partially transparent by default:
Use red mesh lines:
Use red mesh lines in the direction and dashed mesh lines in the direction:
Generate a higher-quality plot:
Emphasize performance, possibly at the cost of quality:
Automatically compute the range and clip extreme portions of it:
Use all points to compute the range:
Plot over a region in :
The region depends on DataRange:
Regions do not have to be connected:
Use any logical combination of conditions:
ListDensityPlot usually colors the density using a color function:
Specify random colors for each vertex:
Plot a probability density function of two variables:
Compare to the empirical density function:
Show the regions closest to a set of points:
Show ozone density around the world:
Use CountryData to add country outlines:
Show a map of Illinois according to the elevation of its cities:
ListDensityPlot is similar to ListPlot3D viewed from above:
ListDensityPlot and ListPlot3D view as a function of and :
The data has only one value for each , pair:
The data has two values for each , pair:
ListDensityPlot associates colors with the vertices of polygons:
Raster, ArrayPlot, MatrixPlot, and ReliefPlot associate colors with the whole polygon:
Use ArrayPlot for arrays of discrete data:
Use MatrixPlot for structural plots of matrices:
Use ReliefPlot for matrices corresponding to medical and geographic values:
Use DensityPlot for functions:
Use ListPointPlot3D to show three-dimensional points:
ListDensityPlot produces smooth color variations:
Use ListContourPlot to get segmented colors:
Use ListPlot3D to create surfaces from continuous data:
Use ListLogPlot, ListLogLogPlot, and ListLogLinearPlot for logarithmic plots:
Use ListPolarPlot for polar plots:
Use DateListPlot to show data over time:
Use ParametricPlot3D for three-dimensional parametric curves and surfaces:
The appearance may depend on the source of the data:
An matrix is by default interpreted as a list of triples:
Use DataRange->All to force interpretation as a matrix of values:
Or provide an explicit list of data ranges to force interpretation as a matrix of values:
New in 1 | Last modified in 6