This IPython Notebook contains a simple example of the scatter function, and also showcases the ability for Bokeh to show two plots in the same Jupyter Notebook cell. To clear all previously rendered cell outputs, select from the menu: Cell -> All Output -> Clear

In [ ]:
import numpy as np
from six.moves import zip

from bokeh.plotting import figure, show, output_notebook

output_notebook()

In [ ]:
N = 4000

x = np.random.random(size=N) * 100
y = np.random.random(size=N) * 100
radii = np.random.random(size=N) * 1.5

In [ ]:
TOOLS="hover,crosshair,pan,wheel_zoom,box_zoom,reset,tap,save,box_select,poly_select,lasso_select"

colors2 = ["#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)]
p1 = figure(width=300, height=300, tools=TOOLS)
p1.scatter(x,y, radius=radii, fill_color=colors2, fill_alpha=0.6, line_color=None)

colors2 = ["#%02x%02x%02x" % (150, int(g), int(b)) for g, b in zip(50+2*x, 30+2*y)]
p2 = figure(width=300, height=300, tools=TOOLS)
p2.scatter(x,y, radius=radii, fill_color=colors2, fill_alpha=0.6, line_color=None)

In [ ]:
show(p1)
show(p2)