Polar scatter demo

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

Define data

In [2]:
# Compute areas and colors
N = 150
r = 2 * np.random.rand(N)
theta = 2 * np.pi * np.random.rand(N)
colors = theta

scatter = hv.Scatter((theta, r), kdims=['theta'], vdims=['r']).redim(r=dict(range=(0,2.5)))

Plot

In [3]:
scatter(plot=dict(projection='polar', size_index='r', scaling_factor=50, color_index='theta'),
        style=dict(cmap='hsv', alpha=0.75))
Out[3]:

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