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 smooth kernel histogram of the values .
plots a smooth kernel histogram with estimator specification espec.
plots the distribution function dfun.
  • SmoothDensityHistogram[data] by default generates colorized grayscale output of 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
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
FrameTruewhether to draw a frame around the plot
FrameTicksAutomaticframe tick marks
LightingAngleNoneeffective angle of the simulated light source
MaxRecursionAutomaticthe maximum number of recursive subdivisions allowed
MeshNonehow many mesh lines to draw
MeshShadingAutomatichow to shade regions between mesh lines
MeshStyleAutomaticthe style for mesh lines
MethodAutomaticthe method to use for refining the plot
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
PlotPointsAutomaticthe initial number of sample points for the function in each direction
PlotRangeAutomaticthe range of f or other values to include
PlotRangeClippingTruewhether to clip at the plot range
PlotRangePaddingAutomatichow much to pad the range of values
RegionFunction(True&)how to determine whether a point should be included
ScalingFunctionsNonehow to scale individual coordinates
WorkingPrecisionMachinePrecisionthe precision used in internal computations
  • ColorFunction is supplied with a single argument, given by default by the scaled value of f, the PDF, CDF, etc. of the distribution.
  • The arguments supplied to RegionFunction are x, y, and f, where f can be the PDF, CDF, etc. of the distribution.
  • 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 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 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 curve:
Use wrappers on datasets:
Use default tooltips:
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 (small) to (large):
Vary the initial bandwidth for an adaptive estimate:
Use initial bandwidths of and :
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:
Add labels:
Color the surface by height:
Create an overlay mesh:
Style the overlay mesh:
Choose the ratio of height to width from the actual plot values:
Use a red boundary around the edges of the surface:
BoundaryStyle applies to regions cut by RegionFunction:
Show clipped regions like the rest of the surface:
Leave clipped regions empty:
Use pink to fill the clipped regions:
Use blue where the surface is clipped above and red below:
Color by scaled coordinate:
Specify gray-level 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:
Color using the natural range of values by setting ColorFunctionScaling to False:
Draw no frame:
Draw frames on the bottom and the left edges only:
Refine the function where it changes quickly:
SmoothDensityHistogram 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:
Use the value as the mesh function:
Use mesh lines in the and directions:
Use mesh lines corresponding to fixed distances from the mean:
Use red mesh lines:
Use red mesh lines in the direction and dashed mesh lines in the direction:
Use more initial points to get a smoother density:
SmoothHistogram3D automatically selects the domain:
Use the full domain generated by SmoothKernelDistribution:
Explicitly provide the domain:
Clip small values of the surface:
BoundaryStyle is used where the region is clipped:
Regions do not have to be connected:
Use any logical combination of conditions:
Show the distribution of eruptions of the Old Faithful geyser at Yellowstone National Park:
SmoothDensityHistogram effectively plots the distribution function of SmoothKernelDistribution:
Use DensityHistogram to plot the data in discrete bins:
Use SmoothDensityHistogram and SmoothHistogram3D for bivariate data:
Use SmoothHistogram for univariate data:
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:
New in 8