question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Too much space between subplots using facet_row in express

See original GitHub issue

plotly==4.1.1 plotly-express==0.4.0 jupyter-lab==1.1.4

When using px.scatter with color and facet_row, the figure adds a ton of space between subplots. Need to give it excessive height to make plots square.

Also, .update_layout( showlegend=False) is not removing the legend. The figure below has 20 subplots.

px.scatter(comps_year, x = 'count', y = 'sum', color = 'YEAR', facet_row= 'COMPANY_CLEAN', width = 500, height = 9000).update_layout(showlegend=False)

Capture

When I remove the width and height parameters, it renders like this:

Capture2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
nicolaskruchtencommented, Jul 16, 2020

As of plotly 4.9, we now have new facet_row_spacing and facet_col_spacing arguments: https://plotly.com/python/facet-plots/#controlling-facet-spacing

4reactions
nicolaskruchtencommented, Jun 17, 2020

We should probably add facet_row_spacing as a kwarg 😃 and same for col

Read more comments on GitHub >

github_iconTop Results From Across the Web

Facet and trellis plots in Python - Plotly
Facet plots, also known as trellis plots or small multiples, are figures made up of multiple subplots which have the same set of...
Read more >
How to resize or set the size of plotly express facet subplots?
I would like to increase the size of each of these facet plots so that they are visualized better. Kindly provide me with...
Read more >
How to remove horizontal spacing between subplots?
I have a figure with 2x2 subplots. I want to make the subplots side by side so that there is no spacing between...
Read more >
Plotly Subplots With Nested Shared Xaxis - ADocLib
Improve subplot size/spacing with many subplots in matplotlib Matplotlib: how you can have two different barmodes simultaneously in Plotly subplots.
Read more >
Plotly legend for each subplot - miocittadino.it
Legend groups can add a little extra spacing between legend items for ... Subplots in Python Subplots and Plotly Express Plotly Express is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found