A lot of work has obviously gone into implementing multi-category axes. This is an old thread, but the OP did reference boxplots. Converting the example in the docs (which uses bar plots) to boxplots doesn’t seem to match the intended outcome. Have I made a mistake with the following:
var trace1 = {
x: [
['SF Zoo','SF Zoo','SF Zoo'],
['giraffes', 'orangutans', 'monkeys']
],
y: [[20, 14, 23], [21, 13, 15], [20, 14, 23]],
name: 'SF Zoo',
type: 'box'
};
var trace2 = {
x: [
['LA Zoo','LA Zoo','LA Zoo'],
['giraffes', 'orangutans', 'monkeys']
],
y: [[25, 1, 24], [22, 13, 19], [20, 14, 23]],
name: 'LA Zoo',
type: 'box'
};
var data = [trace1, trace2];
var layout = {
showlegend: false,
xaxis: {
tickson: "boundaries",
ticklen: 15,
showdividers: true,
dividercolor: 'grey',
dividerwidth: 2
}
};
Plotly.newPlot('myDiv', data, layout);