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

Accessing sub-(sub)-parameters via the Python interface

I am trying to modify a 3D scatter plot and particularly specify the sub-sub parameters under the ‘projection’ attribute. I do not however know how to do this and I would appreciate if you could point me in the right direction, or even more generously, show it by way example. This is a typical 3D scatter plot that I would like to tune further and add ‘projection’ attributes to:
go.Scatter3d(x=x, y=y, z=z, opacity=0.4, marker=dict(color='gray', size=7, symbol='circle', opacity=.4), hoverinfo='none', name='youKnow', connectgaps=False, showlegend=False, mode='markers')

If you have:

trace=go.Scatter3d(x=x, y=y, z=z, 
                               marker=dict(color='gray', size=7, symbol='circle'),
                               hoverinfo='none')

then to insert ‘projection’ attributes you have to update the trace as follows:

trace['projection']={'z': {'opacity':0.8, 'scale': 1.5, 'show':True},
              'x': {'opacity':0.8, 'scale': 1.5, 'show':True},
              'y': {'opacity':0.8, 'scale': 1.5, 'show':True}
             }
1 Like

Thank you so very much for the clear and straightforward answer.