Reader small image

You're reading from  Hands-On Data Visualization with Bokeh

Product typeBook
Published inJun 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781789135404
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Kevin Jolly
Kevin Jolly
author image
Kevin Jolly

Kevin Jolly is a formally educated data scientist with a master's degree in data science from the prestigious King's College London. Kevin works as a statistical analyst with a digital healthcare start-up, Connido Limited, in London, where he is primarily involved in leading the data science projects that the company undertakes. He has built machine learning pipelines for small and big data, with a focus on scaling such pipelines into production for the products that the company has built. Kevin is also the author of a book titled Hands-On Data Visualization with Bokeh, published by Packt. He is the editor-in-chief of Linear, a weekly online publication on data science software and products.
Read more about Kevin Jolly

Right arrow

Creating multiple plots using a tabbed layout

Sometimes it may be more effective to view a single plot at a time but have multiple plots in the same space. This can be done by making use of the tabbed layout that Bokeh offers. Using a tabbed layout, each plot is stored in a single tab and can be accessed by simply clicking on that tab.

We are going to use the same three plots as in the earlier sections to construct the tabbed layout.

In order to create plots in a tabbed layout, we can use the code shown here:

#Import the required packages

from bokeh.models.widgets import Tabs, Panel
from bokeh.io import output_file, show
from bokeh.layouts import column, row

#Create the two panels

tab1 = Panel(child = plot1, title = 'Tab One')

tab2 = Panel(child = column(plot2,plot3), title = 'Tab Two')

#Feed the tabs into a Tabs object

tabs_object = Tabs(tabs = [tab1, tab2])

#Output...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Data Visualization with Bokeh
Published in: Jun 2018Publisher: PacktISBN-13: 9781789135404

Author (1)

author image
Kevin Jolly

Kevin Jolly is a formally educated data scientist with a master's degree in data science from the prestigious King's College London. Kevin works as a statistical analyst with a digital healthcare start-up, Connido Limited, in London, where he is primarily involved in leading the data science projects that the company undertakes. He has built machine learning pipelines for small and big data, with a focus on scaling such pipelines into production for the products that the company has built. Kevin is also the author of a book titled Hands-On Data Visualization with Bokeh, published by Packt. He is the editor-in-chief of Linear, a weekly online publication on data science software and products.
Read more about Kevin Jolly