Iris density grid

Most examples work across multiple plotting backends, this example is also available for:

In [1]:
import numpy as np
import holoviews as hv
hv.extension('matplotlib', width=95)

Declaring data

In [2]:
from bokeh.sampledata.iris import flowers
from holoviews.operation import gridmatrix

iris_ds = hv.Dataset(flowers)

Plot

In [3]:
%%opts Bivariate [bandwidth=0.5] (cmap='Blues') Points (s=4)
density_grid = gridmatrix(iris_ds, diagonal_type=hv.Distribution, chart_type=hv.Bivariate)
point_grid = gridmatrix(iris_ds, diagonal_type=hv.Distribution, chart_type=hv.Points)

# Drop the diagonal from the second grid and replace with empty Overlay
point_grid = point_grid.map(lambda x: hv.Overlay(), hv.Distribution)

density_grid * point_grid
Out[3]:

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