In order to make good graphical analysis and make plots visually attractive you can make use of layouts. The use of layouts, tabs, and grids enhances your plots and create possibilities like using the same axes.
For demonstration purpose, we first create 3 individual plots of different shapes and heights
import pandas as pdimport numpy as npfrom bokeh.plotting import figure, show, ColumnDataSourcefrom bokeh.io import output_notebookoutput_notebook()
In order to plot three plots in a horizontal row we use code as shown below
Plots in a column layout
We can see that the three plots are simply stacked together side by side. If we would like the plots stacked vertically we should use column
Plot in a nested layout
Plot in a grid, similar to nested layout, but only one
Combining the two can create a nested layout
Tabbed layout
It might be more efficient to view a single plot a time but have multiple plots on a panel. Bokeh offers the tab layout, where each plot is stored in a single tab and it can be assessed by clicking on the tab
plot in a tabbed layout
In the example below we show one child on one tab, but two childs by the use of column on the other tab
Plot in a grid layout
A gird layout combines rows and columns and nested layouts and allows you to create plots in several directions. The grid layout is more versatile than the nested layout and you can create attractive layouts
Linking plots together
Sometimes you want to compare plots with each other and therefore, you need the same y-range. The following code illustrates this