WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

SmoothDensityHistogram [{{x1,y1},{x2,y2},}]

plots a smooth kernel histogram of the values {xi,yi}.

SmoothDensityHistogram [{{x1,y1},{x2,y2},},espec]

plots a smooth kernel histogram with estimator specification espec.

SmoothDensityHistogram [{{x1,y1},{x2,y2},},espec,dfun]

plots the distribution function dfun.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Data and Wrappers  
Tabular Data  
Bandwidth and Kernel  
Presentation  
Options  
AspectRatio  
Axes  
AxesLabel  
Show More Show More
AxesOrigin  
AxesStyle  
BoundaryStyle  
ClippingStyle  
ColorFunction  
ColorFunctionScaling  
Frame  
ImageSize  
MaxRecursion  
Mesh  
MeshFunctions  
MeshStyle  
PlotPoints  
PlotRange  
PlotTheme  
RegionFunction  
Ticks  
TicksStyle  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page

SmoothDensityHistogram [{{x1,y1},{x2,y2},}]

plots a smooth kernel histogram of the values {xi,yi}.

SmoothDensityHistogram [{{x1,y1},{x2,y2},},espec]

plots a smooth kernel histogram with estimator specification espec.

SmoothDensityHistogram [{{x1,y1},{x2,y2},},espec,dfun]

plots the distribution function dfun.

Details and Options

Examples

open all close all

Basic Examples  (2)

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:

Scope  (23)

Data and Wrappers  (8)

Plot different distribution functions:

PlotRange is selected automatically:

Use PlotRange to focus on areas of interest:

Nonreal 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:

Tabular Data  (1)

Create a smooth histogram from pH and alcohol values for different wines:

Increase the bandwidth for a smoother plot:

Bandwidth and Kernel  (9)

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:

Presentation  (5)

Add labels:

Color the surface by height:

Create an overlay mesh:

Style the overlay mesh:

Use plot theme:

Options  (68)

AspectRatio  (4)

By default, SmoothDensityHistogram uses the same width and height:

Use a numerical value to specify the height to width ratio:

AspectRatio Automatic determines the ratio from the plot ranges:

AspectRatio Full adjusts the height and width to tightly fit inside other constructs:

Axes  (3)

By default, SmoothDensityHistogram uses a frame instead of axes:

Use axes instead of a frame:

Turn on each axis individually:

AxesLabel  (4)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

Use units as labels:

AxesOrigin  (2)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

AxesStyle  (3)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

BoundaryStyle  (2)

Use a red boundary around the edges of the surface:

BoundaryStyle applies to regions cut by RegionFunction :

ClippingStyle  (4)

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:

ColorFunction  (5)

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:

ColorFunctionScaling  (1)

Color using the natural range of values by setting ColorFunctionScaling to False :

Frame  (2)

Draw no frame:

Draw frames on the bottom and the left edges only:

ImageSize  (7)

Use named sizes such as Tiny , Small , Medium and Large :

Specify the width of the plot:

Specify the height of the plot:

Allow the width and height to be up to a certain size:

Specify the width and height for a graphic, padding with space if necessary:

Setting AspectRatio Full will fill the available space:

Use maximum sizes for the width and height:

Use ImageSize Full to fill the available space in an object:

Specify the image size as a fraction of the available space:

MaxRecursion  (1)

Refine the function where it changes quickly:

Mesh  (7)

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:

MeshFunctions  (3)

Use the value as the mesh function:

Use mesh lines in the and directions:

Use mesh lines corresponding to fixed distances from the mean:

MeshStyle  (2)

Use red mesh lines:

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

PlotPoints  (1)

Use more initial points to get a smoother density:

PlotRange  (3)

SmoothHistogram3D automatically selects the domain:

Use the full domain generated by SmoothKernelDistribution :

Explicitly provide the domain:

PlotTheme  (2)

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

Change the color scheme:

RegionFunction  (4)

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:

Ticks  (4)

Ticks are placed automatically in each histogram:

Use Ticks None to not draw any tick marks:

Place tick marks at specific positions:

Draw tick marks at the specified positions with the specified labels:

TicksStyle  (4)

Specify the overall tick style, including the tick labels:

Specify the tick style for each of the axes:

Specify tick marks with scaled lengths:

Customize each tick with position, length, labeling and styling:

Applications  (2)

Show the distribution of eruptions of the Old Faithful geyser at Yellowstone National Park:

Smooth density histogram for a multivariate time slice of a random process:

Properties & Relations  (7)

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:

Use GeoSmoothHistogram for geographic 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:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2025_smoothdensityhistogram, author="Wolfram Research", title="{SmoothDensityHistogram}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/SmoothDensityHistogram.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_smoothdensityhistogram, organization={Wolfram Research}, title={SmoothDensityHistogram}, year={2025}, url={https://reference.wolfram.com/language/ref/SmoothDensityHistogram.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /