Adding a new separate figure to existing one

#1

Hi

My 3d figure seems OK. I want to add a new separete figure ( a barcahart) without touching the existing one.
I mean
fig=go.Figure(data=data,layout=layout) # this 3D figure OK
Now I need to put another figure ( barcahart) near to existing 3d figure.

I tried fig.append_trace, but it failed.

How can I add a new separate figure beside the existing one ?

regards

#2

Hi @doga,

We don’t have anything built in right now to support merging multiple figures into a single figure. It is something that we’re considering for version 4 if we have enough time (See https://github.com/plotly/plotly.py/issues/1482).

In the meantime, the way to do this is to use an approach like the “Mixed Subplots” example (https://plot.ly/python/mixed-subplots/).

Hope that helps!
-Jon

#3

Thank you,

I am still dealing with mixed subplot example.

I am not clear on how barchart’s (locations) size and place is formed in the layout in that example ?

regards

#4

you can try adding another trace and repositioning your subplots; however, it’ll be best if you share your code.

#5

thank you

with Mixed Subplot it seems ok now.

1 Like