I would like to store / join, multiples subplots layouts dynamically in a data array and layout array and then create a dynamic big graph with my multiples subplots.
My subplots can be mixed type or not.
I saw this mixed example here:
And this other example here:
But in these examples I have to create a single layout object and write manually the “scene1”, “scene2”, “scene3” layout properties…
How can I “concatenate” multiples data and layout objects to create a big dynamic plot with multiples subplots?
One figure can only have a single layout object, however layout can have multiple axes. Can you define the axes in a loop for example?
Also, are you using plotly with Python or Javascript ? With Python we have the fig.update_xaxes and fig.update_yaxes methods which are convenient for updating all axes at the same time.
You cannot concatenate layout objects since a figure has a single layout, however you can retrieve the scene object from each individual layout and populate the layout of the final figure with these scene objects, incrementing their names (‘scene’, ‘scene2’, ‘scene3’). I’m not very familiar with Javascript so it would be hard for me to write a full-fledged example but if you share a codepen with what you’re trying to do I can try to help you modify it.
Emmanuelle,
I am having the same issue, but with Python. I have 3 different plots (the 3 of them a of different types) i created the figure: fig = make_subplots(
rows=1, cols=3, subplot_titles=(“plot1”, “plot2”, “plot3”)
)
how can i have different layouts or each plot. for example different y range for plot1 and plot 2.
How do i retrieve the scene object in python?