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
The Data Visualization Workshop

You're reading from   The Data Visualization Workshop A self-paced, practical approach to transforming your complex data into compelling, captivating graphics

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781800568846
Length 536 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Mario Döbler Mario Döbler
Author Profile Icon Mario Döbler
Mario Döbler
Tim Großmann Tim Großmann
Author Profile Icon Tim Großmann
Tim Großmann
Arrow right icon
View More author details
Toc

Multi-Plots in Seaborn

In the previous topic, we introduced a multi-plot, namely, the pair plot. In this topic, we want to talk about a different way to create flexible multi-plots.

FacetGrid

The FacetGrid is useful for visualizing a certain plot for multiple variables separately. A FacetGrid can be drawn with up to three dimensions: row, col, and hue. The first two have the obvious relationship with the rows and columns of an array. The hue is the third dimension and is shown in different colors. The FacetGrid class has to be initialized with a DataFrame, and the names of the variables that will form the row, column, or hue dimensions of the grid. These variables should be categorical or discrete.

The seaborn.FacetGrid(data, row, col, hue, …) command initializes a multi-plot grid for plotting conditional relationships.

Here are some interesting parameters:

  • data: A tidy ("long-form") DataFrame where each column corresponds to a variable, and each...
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