By inspecting the plot generated by python in browser you can just copy paste what you find in .layout and .data:
fig.layout["xaxis2"] = {
"anchor": "y2",
"domain": [
0.7413,
1
],
"matches": "x2",
"showticklabels": false,
"showline": false,
"ticks": "",
"autorange": true
}
fig.layout["xaxis3"] = {
"anchor": "y3",
"domain": [
0,
0.7363
],
"matches": "x",
"showticklabels": false,
"type": "linear",
"autorange": true
}
fig.layout["xaxis4"] = {
"anchor": "x4",
"domain": [
0.7426,
1
],
"matches": "y3",
"showticklabels": false,
"showline": false,
"ticks": "",
}
fig.layout.xaxis.domain = [0, 0.7363];
fig.layout.xaxis.anchor = "y";
var x_histogram_data = {
alignmentgroup: "True",
bingroup: "x",
xaxis: "x3",
yaxis: "y3",
x: data_for_x,
type: 'histogram',
marker: {
color: '#636efa'
},
};
fig.data.push(x_histogram_data);
fig.layout["yaxis2"] = {
"anchor": "x2",
"domain": [
0,
0.7326
],
"matches": "y",
"showticklabels": false,
"type": "linear",
"autorange": true
}
fig.layout["yaxis3"] = {
"anchor": "x3",
"domain": [
0.7426,
1
],
"matches": "y3",
"showticklabels": false,
"showline": false,
"ticks": "",
"autorange": true
}
fig.layout["yaxis4"] = {
"anchor": "y4",
"domain": [
0.7413,
1
],
"matches": "x2",
"showticklabels": false,
"showline": false,
"ticks": ""
}
fig.layout.yaxis.domain = [0, 0.7326];
fig.layout.yaxis.anchor = "x";
var y_histogram_data = {
alignmentgroup: "True",
bingroup: "y",
xaxis: "x2",
yaxis: "y2",
y: data_for_y,
type: 'histogram',
marker: {
color: '#636efa'
},
};
fig.data.push(y_histogram_data);