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


plots a 3D smooth kernel histogram of the values .
plots a 3D smooth kernel histogram with estimator specification espec.
plots the distribution function dfun.
plots smooth kernel histograms for multiple datasets .
  • SmoothHistogram3D[data] by default plots the PDF of , based on a smooth kernel density estimate.
  • The estimator specification espec can be of the form bw or .
  • Possible distribution functions dfun include:
"PDF"probability density function
"CDF"cumulative distribution function
"SF"survival function
"HF"hazard function
"CHF"cumulative hazard function
  • The form provides a wrapper w to be applied to the resulting graphics primitives.
  • The following wrappers can be used:
Annotation[e,label]provide an annotation
Button[e,action]define an action to execute when the element is clicked
EventHandler[e,...]define a general event handler for the element
Hyperlink[e,uri]make the element act as a hyperlink
PopupWindow[e,cont]attach a popup window to the element
StatusArea[e,label]display in the status area when the element is moused over
Style[e,opts]show the element using the specified styles
Tooltip[e,label]attach an arbitrary tooltip to the element
AxesTruewhether to draw axes
BoundaryStyleAutomatichow to draw boundary lines for surfaces
BoxRatios{1,1,0.4}bounding 3D box ratios
ClippingStyleAutomatichow to draw clipped parts of surfaces
ColorFunctionAutomatichow to determine the color of surfaces
ColorFunctionScalingTruewhether to scale arguments to ColorFunction
FillingNonefilling under each surface
FillingStyleOpacity[0.5]style to use for filling
MaxRecursionAutomaticthe maximum number of recursive subdivisions allowed
MeshAutomatichow many mesh lines in each direction to draw
MeshFunctions{#3&}how to determine the placement of mesh lines
MeshShadingNonehow to shade regions between mesh lines
MeshStyleAutomaticthe style for mesh lines
MethodAutomaticthe method to use for refining surfaces
NormalsFunctionAutomatichow to determine effective surface normals
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
PlotPointsAutomaticthe initial number of sample points in each direction
PlotRangeAutomaticthe range of z or other values to include
PlotStyleAutomaticgraphics directives for the style for each surface
RegionFunction(True&)how to determine whether a point should be included
ScalingFunctionsNonehow to scale individual coordinates
WorkingPrecisionMachinePrecisionthe precision used in internal computations
  • With ScalingFunctions, the coordinate is scaled using , the coordinate is scaled using , and the coordinate is scaled using .
Plot a smooth density function for a dataset:
Plot several datasets:
Plot the probability density function of the data:
Cumulative distribution function:
Survival function:
Hazard function:
Cumulative hazard function:
Plot a smooth density function for a dataset:
Click for copyable input
Plot several datasets:
Click for copyable input
Plot the probability density function of the data:
Click for copyable input
Click for copyable input
Cumulative distribution function:
Click for copyable input
Survival function:
Click for copyable input
Hazard function:
Click for copyable input
Cumulative hazard function:
Click for copyable input
Plot different distribution functions:
PlotRange is selected automatically:
Use PlotRange to focus on areas of interest:
Non-real data points are ignored:
Specify the number of points to use:
Specify the number of times to refine the surface:
Use wrappers on datasets:
Use the default tooltip for the data:
Override the default tooltips:
Specify a single bandwidth for bivariate data:
Specify bivariate bandwidths in units of standard deviation:
Allow bivariate bandwidths to vary adaptively with local density:
Use the local sensitivity from 0.25 (small) to 0.75 (large):
Vary the initial bandwidth for an adaptive estimate:
Use initial bandwidths of 1. and 0.25:
Use any of several automatic bandwidth selection methods:
Silverman's method is used by default for bandwidth selection:
The PDFs are equivalent:
Use different bandwidth specifications in each dimension:
Specify any one of several kernel functions:
Define the kernel function as a pure function:
Provide an explicit PlotStyle for the surface:
Use neutral lighting:
Provide separate styles for different surfaces:
Add labels:
Color the surface by height:
Style the areas between mesh lines:
Create an overlay mesh:
Use a black boundary around the edges of the surface:
Do not use any boundary:
Use a thick boundary around the edges of the surface:
BoundaryStyle applies to holes cut by RegionFunction:
Automatic uses the natural scale from PlotRange:
Use BoxRatios to emphasize some particular feature, in this case the peaks of the surface:
Color clipped regions like the rest of the surface:
Do not draw clipped regions:
Make clipped regions partially transparent:
Color clipped regions red at the bottom and blue at the top:
Color by scaled , , and values:
Color according to the and coordinates:
Color by scaled coordinate:
Named color gradients from ColorData color in the direction:
ColorFunction has higher priority than PlotStyle:
ColorFunction has lower priority than MeshShading:
Use unscaled coordinates:
Use scaled coordinates in the and directions and unscaled coordinates in the direction:
Fill to the top:
Filling occurs along the region cut by the RegionFunction:
Fill to both top and bottom:
Fill to the bottom with a variety of styles:
Fill to the plane with red below:
Colored lights are used to shade the surface:
Lighting uses white lights:
Refine the surface where it changes quickly:
SmoothHistogram3D typically has 10 mesh lines in the direction:
Use 5 mesh lines in the direction:
Use no mesh:
Show the complete sampling mesh:
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:
SmoothHistogram3D uses a height mesh by default:
Use mesh lines in the and directions:
Use mesh lines corresponding to fixed distances from the mean:
Use None to remove regions:
Lay a checkerboard pattern over a surface:
MeshShading has a higher priority than PlotStyle:
MeshShading has a higher priority than ColorFunction:
Use red mesh lines:
Use red mesh lines in the direction and thick mesh lines in the direction:
Normals are automatically calculated:
Use None to get flat shading for all the polygons:
Vary the effective normals used on the surface:
Use more initial points to get a smoother surface:
Use 20 initial points in the direction and 5 in the direction:
SmoothHistogram3D automatically selects the domain:
Use the full domain generated by SmoothKernelDistribution:
Explicitly provide the domain:
Show the surface over the full , range from the data:
Use an explicit range to emphasize features:
Color a surface with diffuse orange:
Use Specularity to get highlights:
Use Opacity to get transparent surfaces:
Use separate styles for each of the surfaces:
Produce a wire mesh:
Clip small values of the surface:
Filling will fill from the region boundary:
Regions do not have to be connected:
Use any logical combination of conditions:
Determine the number of modes present in bivariate data. It is good practice to observe the density over a range of bandwidths:
Over several bandwidth choices two modes are identified:
Compare the distribution of data to a parametric model:
Quantify the comparison with DistributionFitTest:
SmoothHistogram3D effectively plots the distribution function of SmoothKernelDistribution:
Use SmoothDensityHistogram and SmoothHistogram3D for bivariate data:
Use SmoothHistogram for univariate data:
Use Histogram3D and DensityHistogram to plot the data in discrete bins:
Use DiscretePlot3D to plot the data at discrete points:
Additional points will result in a better approximation of the underlying distribution:
As the bandwidth approaches infinity, the estimate approaches the shape of the kernel:
Visualize the density of Old Faithful geyser data with the original data as an inset graphic:
New in 8