Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Data Visualization with Bokeh

You're reading from   Hands-On Data Visualization with Bokeh Interactive web plotting for Python using Bokeh

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781789135404
Length 174 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Kevin Jolly Kevin Jolly
Author Profile Icon Kevin Jolly
Kevin Jolly
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Bokeh Installation and Key Concepts FREE CHAPTER 2. Plotting using Glyphs 3. Plotting with different Data Structures 4. Using Layouts for Effective Presentation 5. Using Annotations, Widgets, and Visual Attributes for Visual Enhancement 6. Building and Hosting Applications Using the Bokeh Server 7. Advanced Plotting with Networks, Geo Data, WebGL, and Exporting Plots 8. The Bokeh Workflow – A Case Study 9. Other Books You May Enjoy

Creating multiple plots in a row and column

We might see a situation in which we would like to compare the two scatter plots horizontally, but would like the time series plot to be stacked here with the scatter plots, but all within the embrace of the same layout.

Such a combination of horizontal and vertical layouts is called a nested layout.

We can construct a nested layout by using the code shown here:

#Import the required packages

from bokeh.layouts import column, row
from bokeh.io import output_file, show

#Construct the nested layout

nested_layout = column(row(plot1,plot2), plot3)

#Output the plot

output_file('nested.html')

show(nested_layout)

This results in a plot as illustrated here:

Plots 1, 2, and 3 in a nested layout

In the previous code, we used the row function to combine Plot 1 and Plot 2 in a horizontal row and then used the column function on the horizontal...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image