DensityHistogram

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

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

DensityHistogram[{{x1,y1},{x2,y2},},bspec]

plots a density histogram with bins specified by bspec.

DensityHistogram[{{x1,y1},{x2,y2},},bspec,hspec]

plots a density histogram with bin densities computed according to the specification hspec.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Plot a density histogram for a dataset:

Include a legend for the bin colors:

Plot the probability density function of the data:

Cumulative distribution function:

Survival function:

Hazard function:

Cumulative hazard function:

Scope  (12)

Data  (8)

Specify the number of bins to use:

Specify a different number of bins to use in x and y:

Specify the bin width:

Specify a different bin width to use in x and y:

Specify bin delimiters:

Specify different bin delimiters to use in x and y:

Specify bin delimiters as an explicit list:

Specify different bin delimiters to use in x and y:

Use different automatic binning methods:

Use different height specifications:

Use a height function that accumulates the bin counts over the y direction:

Nonreal data is taken to be missing:

Presentation  (4)

Add labels:

Color the surface by height:

Style bins:

Use plot theme:

Options  (25)

AspectRatio  (4)

By default, DensityHistogram uses the same width and height:

Specify the height to width ratio:

Use Automatic to determine the ratio from the values:

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

ChartBaseStyle  (3)

Use ChartBaseStyle to style bins:

ChartBaseStyle combines with ColorFunction:

ColorFunction may override settings for ChartBaseStyle:

ChartElementFunction  (3)

Get a list of built-in settings for ChartElementFunction:

For detailed settings, use Palettes ChartElementSchemes:

Write a custom ChartElementFunction:

ColorFunction  (5)

Color by height:

Named color gradients color in the direction:

Use brightness to correspond to height or density of a function:

Use ColorFunctionScaling->False to get unscaled height values:

Use ColorFunction to combine different style effects:

ColorFunctionScaling  (2)

By default, scaled height values are used:

Use ColorFunctionScaling->False to get unscaled height values:

LabelingFunction  (3)

Use automatic labeling by values through Tooltip and StatusArea:

Do no labeling:

Use Placed to control label placement:

Method  (2)

Show data of each dimension on axes:

Use a box-whisker glyph to show how data distributes in each dimension:

PerformanceGoal  (1)

Generate a bar chart with interactive highlighting:

Emphasize performance by disabling interactive behaviors:

Typically, less memory is required for non-interactive charts:

PlotTheme  (2)

Use simple ticks in a bright color scheme:

Change color scheme:

Applications  (3)

Estimate the density of volcanic craters in western Uganda:

Volcanic crater locations:

A scaling function for labeling:

The estimated density with a scaled legend:

Density histogram for a multivariate time slice of a random process:

Analyze TemporalData by plotting a density histogram for two-dimensional time slices:

Properties & Relations  (4)

DensityHistogram automatically determines bins to use based on data:

DensityHistogram colors the height according to ColorFunction:

Use Histogram3D to visualize data in 3D:

Use SmoothDensityHistogram and SmoothHistogram3D to compare estimated distribution with the data:

Neat Examples  (1)

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_densityhistogram, author="Wolfram Research", title="{DensityHistogram}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/DensityHistogram.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_densityhistogram, organization={Wolfram Research}, title={DensityHistogram}, year={2015}, url={https://reference.wolfram.com/language/ref/DensityHistogram.html}, note=[Accessed: 19-March-2024 ]}