Bokeh Tutorial

1.6 Layout

Exercise: Wrap your visualizations in functions

Wrap each of the previous visualizations in a function in a python file (e.g. viz.py):

  • Climate + Map: climate_map()
  • Legend: legend()
  • Timeseries: timeseries()

In [ ]:
# Import the functions from your file

In [ ]:
# Create your plots with your new functions

In [ ]:
# Test the visualizations in the notebook

In [ ]:
from bokeh.plotting import show, output_notebook

In [ ]:
# Show climate map

In [ ]:
# Show legend

In [ ]:
# Show timeseries

Exercise: Layout your plots using hplot and vplot


In [ ]:
from bokeh.plotting import vplot, hplot

In [ ]:
# Create your layout

In [ ]:
# Show layout

Exercise: Store your layout in an html page


In [ ]:
from bokeh.plotting import output_file