5.5 Presentation and Layouts
Last updated
Last updated
Bokeh includes several layout options for arranging plots and widgets. They make it possible to arrange multiple components to create interactive dashboards or data applications.
You've seen some examples in the last sessions. We can nest as many rows, columns, or grids of plots together as we like.
To display plots horizontally, use the row()
function.
To display plots or widgets in a vertical, use the column()
function.
Thegridplot()
function can be used to arrange Bokeh Plots in the grid layout. It also collects all tools into a single toolbar, and the currently active tool is the same for all plots in the grid. It is possible to leave “empty” spaces in the grid by passingNone
instead of a plot object.
Below is a sophisticated example of a nested layout with different sizing modes.