Correlation Matrix with HoloViews¶

We will show in this example how to create a grid with scatter plots

In [1]:
import numpy as np
import holoviews as hv
hv.extension('bokeh')
In [2]:
from holoviews.operation import gridmatrix
In [3]:
import pandas as pd
In [4]:
decathlon = pd.read_csv("decathlon.csv")
In [5]:
ds=hv.Dataset(decathlon[['100m','Long.jump','Shot.put','Competition']])
In [6]:
grouped_by_competition = ds.groupby('Competition', container_type=hv.NdOverlay)
In [7]:
grid = gridmatrix(grouped_by_competition, diagonal_type=hv.Scatter)
In [8]:
grid.options('Scatter', tools=['hover', 'box_select'], bgcolor='#efe8e2', fill_alpha=0.2, size=4)
Out[8]: