What units does Plotly camera center (layout.scene.camera.center) use?

In a 3D Plotly plot the camera center defaults to (0,0,0), where, as far as I understand, (0,0,0) refers to the centre of the 3D volume occupied by the plot, not the coordinate (0,0,0).

These values can be changed via layout.scene.camera.center as documented here and here. However, I can’t work out what units are being used, nor can I find this information in the documentation.

E.g. if I change the camera center to (1,1,1), where is this in relation to my plot? From a bit of experimenting I have discovered that:

  • (1,1,1) puts the camera center outside the volume occupied by my plot, but I can’t figure out how far outside,
  • (0.5, 0.5, 0.5) put the camera center near, but not exactly on, one of the edges of the volume occupied by the plot; sometimes it is near a corner of the volume, sometimes it is along an edge.

@RobS did you ever figure anything out here? I’ve been doing a bunch of experimenting and just came to the same conclusion that you did, that the center value is somehow relative to the overall size of the plot, but it seems like it’s ranges must be computed dynamically from the data at hand.

Likely similar to you, I’m trying to use eye center and up to recreate a very specific viewport of the scene, but I guess I’m too used to the conventions found something like gluLookAt, and this is not behaving like gluLookAt as far as I can tell, most likely because Plotly scales the data before it hits WebGL.

EDIT: ah, I see there was some other good discussion over at this thread on Stack Overflow . I will give this a try