Treemaps are special charts, and when you insert them as subplots, you have to
set domain_x, domain_y as subintervals in [0,1], to inform plotly.js where to locate
each treemap window within the unit square [0,1] x[0,1] (the plotting window).
Here is an example where in each subplot I inserted the same tree (with data from Treemap charts in Python):
using PlotlyJS
tree1= treemap(
labels = ["Eve","Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
parents = ["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"],
root_color="lightgrey",
domain_x = [0,1],
domain_y = [0,0.48]
)
tree2= treemap(
labels = ["Eve","Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
parents = ["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"],
root_color="lightgrey",
domain_x =[0,1],
domain_y = [0.52, 1]
)
data= [tree1, tree2]
layout=Layout(width=700, height=500)
pl = plot(data, layout)
