# リスト7.12.1:column()関数で縦に並べる
from bokeh.plotting import figure, output_notebook, show
from bokeh.layouts import column
output_notebook()
p1 = figure(plot_width=200, plot_height=200)
p2 = figure(plot_width=200, plot_height=200)
show(column(p1, p2))
# リスト7.12.2:row()関数で横に並べる
from bokeh.layouts import row
p1 = figure(plot_width=200, plot_height=200)
p2 = figure(plot_width=200, plot_height=200)
show(row(p1, p2))
# リスト7.12.3:gridplot()関数で並べる
from bokeh.layouts import gridplot
p1 = figure(plot_width=200, plot_height=200)
p2 = figure(plot_width=200, plot_height=200)
p3 = figure(plot_width=200, plot_height=200)
p1.circle([0], [0], size=50)
p2.square([0], [0], size=50)
p3.triangle([0], [0], size=50)
show(gridplot([[p1, p2], [None, p3]]))
# リスト7.12.4:ncolsを指定したgridplot()関数で並べる
from bokeh.layouts import gridplot
p1 = figure(plot_width=200, plot_height=200)
p2 = figure(plot_width=200, plot_height=200)
p3 = figure(plot_width=200, plot_height=200)
p1.circle([0], [0], size=50)
p2.square([0], [0], size=50)
p3.triangle([0], [0], size=50)
show(gridplot([p1, p2, None, p3], ncols=2))
# リスト7.12.5:layout()関数で並べる
from bokeh.layouts import layout
p1 = figure(plot_width=200, plot_height=200)
p2 = figure(plot_width=200, plot_height=200)
p3 = figure(plot_width=400, plot_height=200)
p1.circle([0], [0], size=50)
p2.square([0], [0], size=50)
p3.triangle([0], [0], size=50)
show(layout([p1, p2], [p3]))