Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Rotated graph with the x axis as the axis of rotation

Hi, I want y-axis to be the vertical axis of scatter3d graph.

not like this;
yuna14

like this;
yuna15

I rename the title of y-axis to “z”, and z-axis to “y” but text in those labels do not change, so it was useless.
yuna16

What is the most smartest way to fix?
Thanks.

Edit:
I suppose I solved it :grinning:

// array x, y and z is defined
var text = [];
for(var i=0;i<data.lenegth;i++){
text.push('x: '+x[i]+'
y: '+y[i]+'
z: '+y[i]);
}
var trace = {
x:x,y:z,z:y,
text:text,
hoverinfo:‘text+name’,
scene:‘scene’
}
var layout = {
scene:{
xaxis:{title:‘x’},
yaxis:{title:‘z’},
zaxis:{title:‘y’}
}
}

Your solution is the correct one, for now.

You hope to improve this somewhat in the next minor release. You can subscribe to https://github.com/plotly/plotly.js/pull/3317 for the latest news.

1 Like