Title
Distribution Element
Dependencies
Plotly
Backends
Plotly

In [ ]:
import numpy as np
import holoviews as hv
hv.extension('plotly')

A Distribution Element is a quick way of visualize the distribution of some data visualizing it as a a histogram or kernel density estimate. Unlike the Histogram Element Distribution wraps the raw data rather than representing the already binned data.

Here we will wrap a simple numpy array containing 1000 samples of a normal distribution.


In [ ]:
hv.Distribution(np.random.randn(1000))

Distribution Elements like all other Elements can be overlaid allowing us to compare two distributions:


In [ ]:
hv.Distribution(np.random.randn(1000), label='#1') * hv.Distribution(np.random.randn(1000)+2, label='#2')

For full documentation and the available style and plot options, use hv.help(hv.Distribution).