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

Locking turntable rotation to different axis

I’ve got a 3D scatterplot that, for reasons of translating Unity coordinates to Plotly ones, does not have the correct “up” axis by default in my dataset. To fix this issue, I set camera up values to: x: 0, y: 1, z: 0, but I want to use turntable rotation on this graph (orbital is somewhat disorienting), and using turntable rotation locks the axes in such a way that the chart again has the wrong “up” axis when rotating in turntable mode. Is there some way to specify a different “locked” axis in turntable rotation mode? Or to specify that the turntable rotation obey the camera’s up values?

Hey @chadamski where you able to find a solution for this?

There is no option for that at the moment.
But you should be able to replace values in y with z e.g.

{
  type: 'scatter3d',
  x: x,
  y: z,
  z: y,
 ...
}
1 Like

This is totally the way to do it. I feel pretty dumb about trying to wrangle the camera controls when I could have just switched the axes all along. Whew.