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.

PX figure composition

See original GitHub issue

It would be really nice to be able to take two figures created with Plotly Express (or really anything else) and “glue them together” side by side or one above the other, something like fig3 = compose([fig1, fig2, fig3], orientation="h") or something even more powerful.

I love how ggplot patchwork https://github.com/thomasp85/patchwork and Altair https://altair-viz.github.io/user_guide/compound_charts.html do this!

See also Overlaying: #2648

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:27
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
Naseefopcommented, Oct 14, 2021

Any updates here?.
Spend 1-hour searching for a solution!!

2reactions
nicolaskruchtencommented, Nov 24, 2020

Hmm this last one is kind of funny… What’s happening here is that both the traces you’re extracting with data[0] have bingroup: "x" (where “x” is just an arbitrary string, but it’s the PX default) and so the right-hand plot is getting all its data stuck in a single bin! Definitely something we’ll have to manage with this composition issue!

If you run fig.update_traces(bingroup=None) after your code that’ll clear the groups and each trace will be binned on its own.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly express in Python
The plotly.express module (usually imported as px ) contains functions that can create entire figures at once, and is referred to as Plotly...
Read more >
Px and Tx Diagrams | PNG 520: Phase Behavior of Natural ...
Even though “x” stands for “composition” — in a general sense — here, ... In a P-x diagram (Figure 5.3), the bubble point...
Read more >
Stacked Bar Charts with Plotly Express - Towards Data Science
First, we imported Plotly Express as px, the Pandas library as pd and ... Figure 1 shows a simple stacked bar of the...
Read more >
Perple_X T-X, P-X and X-X phase diagram sections
Figures : Figure 1. Metapelite phase diagram section, high resolution, ... For the high resolution calculation, phase compositions where discretized with an ...
Read more >
Pixel - Wikipedia
In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest...
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