In [1]:
import numpy as np

from bokeh.plotting import figure, show, output_notebook, hplot, vplot, save
from bokeh.resources import CDN
from bokeh.browserlib import view
output_notebook()


/Users/caged/miniconda3/envs/bokeh_miscellany/lib/python3.5/site-packages/bokeh/browserlib.py:2: BokehDeprecationWarning: bokeh.browserlib was deprecated in 0.11: use bokeh.util.browser instead
  deprecated_module('bokeh.browserlib', '0.11', 'use bokeh.util.browser instead')
Loading BokehJS ...

In [2]:
# Make plots

N = 100

x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)

#output_file("scatter.html", title="scatter.py example")

opts = dict(
    tools="pan,wheel_zoom,box_zoom,reset,save,box_select",
    plot_width=300,
    plot_height=300,
    )

p1 = figure(**opts)
p1.scatter(x,y, color="#FF00FF", nonselection_fill_color="#FFFF00", nonselection_fill_alpha=1)

p2 = figure(**opts)
p2.scatter(x,y, color="red")

p3 = figure(**opts)
p3.scatter(x,y, marker="square", color="green")

p4 = figure(**opts)
p4.scatter(x,y, marker="square", color="blue")


Out[2]:
<bokeh.models.renderers.GlyphRenderer at 0x113c9f860>

In [3]:
# Save to a file
filename = 'hplot.hmtl'
save(hplot(p1, p2), filename=filename, resources=CDN, title='hplot html')
view(filename)


/Users/caged/miniconda3/envs/bokeh_miscellany/lib/python3.5/site-packages/ipykernel/__main__.py:3: BokehDeprecationWarning: bokeh.io.hplot was deprecated in Bokeh 0.12.0; please use bokeh.models.layouts.Row instead
  app.launch_new_instance()

In [4]:
show(hplot(p1, p2,))


/Users/caged/miniconda3/envs/bokeh_miscellany/lib/python3.5/site-packages/ipykernel/__main__.py:1: BokehDeprecationWarning: bokeh.io.hplot was deprecated in Bokeh 0.12.0; please use bokeh.models.layouts.Row instead
  if __name__ == '__main__':
Out[4]:

<Bokeh Notebook handle for In[4]>

Workaround


In [32]:
show(vplot(hplot(p3, p4,)))