Lighting and marker sizing in scatter3d

I have a 3D scatter plot that was pleasantly straightforward to get to its current state, but I’m making no progress in refining a few aspects of it:

  1. The sizing of the marker points and those in the legend - if I set marker: { size: 14}, the size of both changes. 14 looks good for the legend, but too large for the data. If I set the size to suit the data, the markers in the legend become tiny. Is there a way to set them independantly, or change the ratio between them?

  2. mesh3d and surface both have the concept of lighting, but scatter3d appears not to. When markers overlap, as shown below, some lighting to give the markers more definition would be very beneficial. Is this possible?

  3. Marker sizing as a function of depth into the screen would also help with comprehension. A user has to waggle the view around in order to gain a sense of whether a marker is near or far.

There’s no way to set the size of the marker points in the legend items at the moment unfortunately

There’s no lighting options for scatter3d at the moment. I’d recommend using marker.opacity in the meantime.

There’s no way to do that at the moment either.

In case this is still bothering anyone, you can now set the legend size to be constant to stop it resizing depending on the trace data.


Has there been any updates or workarounds for the lighting of scatter3d? I haven’t found anything in the forum or documentation.

When visualizing bigger scenes it is really difficult to differentiate between points that are far or near, as well as recognizing objects in the scene. A lighting source would be really helpful.

As an example I’m adding the visualization of the same scene in plotly and open3d.
Open3d is using the point normals to simulate lighting conditions and can therefore aid in the visualization process.