Distribution#

Download this notebook from GitHub (right-click to download).


Title
Distribution Element
Dependencies
Plotly
Backends
Plotly
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.

hv.Distribution(np.random.randn(1000))

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

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).

This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

Download this notebook from GitHub (right-click to download).