Nextjournal / May 13 2020
Bokeh Template
Configure Bokeh and setup imports.
import numpy as npfrom bokeh.plotting import figure, output_file, showoutput_file('/results/bokeh-1.html')0.0s
Python
And start plotting.
N = 4000x = np.random.random(size=N) * 100y = np.random.random(size=N) * 100radii = np.random.random(size=N) * 1.5colors = ["#%02x%02x%02x" % (r, g, 150) for r, g in zip(np.floor(50+2*x).astype(int), np.floor(30+2*y).astype(int))]p = figure()p.circle(x, y, radius=radii, fill_color=colors, fill_alpha=0.6, line_color=None)show(p);0.3s
Python