You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Just spent half an hour looking for a solution to this. Any progress made this week? I need to make some 2x2 subplots with different Y axes. Compose would be very helpful!
This would be a necessary feature, already strongly suggested by the community. The solutions so far are either not native Plotly or depreciates the PX design, for example, by taking only the trace, and leaving the layout out. See: plotly/plotly_express#83 (comment)
In the mentioned way, the rug, color, etc, are totally ignored.
The second histogram on the right does not render properly, something goed wrong with the axis and/or default values. I can't see which setting causes this. Could you give a pointer in the right direction perhaps?
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.
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson
As far as I know there is still now way to make a composition of multiple figures created with Plotly Express. So yes, still an issue.
i Have a solution that can help all of you looking for something like this that can simply do dashboard.add_chart([fig1, fig2, fig3])
and outputs a ready local hosted html dashboard that displays these charts neatly, organized, and colorful.
the solution is called Dashforge, a python library that helps take those charts you made and places them side by side however you like so you can view it easily however you like. Dashforge library
Activity
JayPalm commentedon Jul 24, 2020
Just spent half an hour looking for a solution to this. Any progress made this week? I need to make some 2x2 subplots with different Y axes. Compose would be very helpful!
vcmorini commentedon Aug 11, 2020
This would be a necessary feature, already strongly suggested by the community. The solutions so far are either not native Plotly or depreciates the PX design, for example, by taking only the trace, and leaving the layout out. See: plotly/plotly_express#83 (comment)
In the mentioned way, the rug, color, etc, are totally ignored.
nicolaskruchten commentedon Aug 11, 2020
If anyone wants to take this on, I'd be happy to review the code :) It's not on our short-term roadmap at the moment, despite how useful it would be!
dkapitan commentedon Nov 21, 2020
@nicolaskruchten
Am considering to take up this issue. Running into the following difficulty when trying to figure out a solution on Google Colab:
The second histogram on the right does not render properly, something goed wrong with the axis and/or default values. I can't see which setting causes this. Could you give a pointer in the right direction perhaps?

nicolaskruchten commentedon 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]havebingroup: "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.Naseefop commentedon Oct 14, 2021
Any updates here?.
Spend 1-hour searching for a solution!!
ericchansen commentedon Apr 4, 2022
I am also hoping for this functionality.
atar-axis commentedon Nov 29, 2022
Please add this! I would also add some bugs to the bucket if needed. Where can I donate?
lopez-hector commentedon Feb 21, 2024
Just pinging this. Would be helpful.
gvwilson commentedon Jul 8, 2024
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson
Grisly00 commentedon Jul 16, 2024
As far as I know there is still now way to make a composition of multiple figures created with Plotly Express. So yes, still an issue.
[-]PX figure composition[/-][+]enable plotly express figure composition[/+]nzjrs commentedon Aug 15, 2024
ig3 = compose([fig1, fig2, fig3], orientation="h")would be a perfect API for this.Omar-astro commentedon Aug 1, 2026
i Have a solution that can help all of you looking for something like this that can simply do
dashboard.add_chart([fig1, fig2, fig3])and outputs a ready local hosted html dashboard that displays these charts neatly, organized, and colorful.
the solution is called Dashforge, a python library that helps take those charts you made and places them side by side however you like so you can view it easily however you like.
Dashforge library