Reader small image

You're reading from  Interactive Dashboards and Data Apps with Plotly and Dash

Product typeBook
Published inMay 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800568914
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Elias Dabbas
Elias Dabbas
author image
Elias Dabbas

Elias Dabbas is an online marketing and data science practitioner. He produces open-source software for building dashboards, data apps, as well as software for online marketing, with a focus on SEO, SEM, crawling, and text analysis.
Read more about Elias Dabbas

Right arrow

Using facets to split charts into multiple sub-charts – horizontally, vertically, or wrapped

This is a very powerful technique that allows us to add a new dimension to our analysis. We can select any feature (column) from our dataset to split the chart by. If you are expecting a long explanation of how it works, and what you need to learn to master it, don't. Just like most other things in Plotly Express, if you have a long-form (tidy) dataset, all you have to do is select a column and use its name for the facet_col or facet_row parameter. That's it.

Let's take a quick look at the available options for facets by looking at the relevant facet parameters:

  • facet_col: This means you want to split the chart into columns, and the selected column name will be used to split them. This results in the charts being displayed side by side (as columns).
  • facet_row: Similarly, if you want to split the chart into rows, you can use this parameter, which will split...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Interactive Dashboards and Data Apps with Plotly and Dash
Published in: May 2021Publisher: PacktISBN-13: 9781800568914

Author (1)

author image
Elias Dabbas

Elias Dabbas is an online marketing and data science practitioner. He produces open-source software for building dashboards, data apps, as well as software for online marketing, with a focus on SEO, SEM, crawling, and text analysis.
Read more about Elias Dabbas