Black Lives Matter. Please consider donating to Black Girls Code today.

Hard coded axis names in Multiple Custom Subplots with Potly.js

Dear community member,

We are trying to use “Multiple Custom Sized Subplots with Potly.js Charts” and noticed that axis attached to the trace need to have values (x,y), ( x1, y1), … (xn, yn). This forces us to stick with the default names for he axis

For example for trace 3 in the link provided above
var trace3 = {
x: [1, 2],
y: [1, 2],
type: ‘scatter’,
name: ‘(1,2)’,
xaxis: ‘x3’,
yaxis: ‘y3’
};

if I change the name of the axis to x5, y5 as below then plot.ly fails to plot
var trace3 = {
x: [1, 2],
y: [1, 2],
type: ‘scatter’,
name: ‘(1,2)’,
xaxis: ‘x10’,
yaxis: ‘y10’
};

Is this the intended design? or am I understanding it wrong.

xaxis: 'x10' means link this trace x coordinates to the layout.xaxis10. So if your graph does not have a layout.xaxis10 yes it will indeed fail to plot.