Leo Pfeiffer
Leo Pfeiffer

Reputation: 11

Updating permanent plotly spikes in scatter_3d

I am using plotly to illustrate the 3D behavior of a large quantity of data points (see the screenshot of the plot I am trying to produce. ). Once I hover over the plot I see the spike line as intended. However, if I move further there remains an artifact as a white imprint on the background which I want to be removed.

For reference, this is the code I am using:

fig = px.scatter_3d(df,
                    x='x',
                    y='y',
                    z='z',
                    size='size',
                    #size_max= 4,
                    opacity =0.5,
                    color = 'color'
                    )

fig.update_traces(marker=dict(line=dict(width=0.1, color='black')), selector=dict(mode='markers'))

fig.update_layout(
    width = 1100,
    height = 800,
    scene = dict(aspectmode = "manual", aspectratio = dict(x=1, y=1, z=1)))

#fig.update_scenes(xaxis_spikesides=False,yaxis_spikesides=False,zaxis_spikesides=False)


#fig.update_traces(hovertemplate=None, hoverinfo='none')
fig.show()

My attempts to solve this are taken from other questions regarding plotly spike lines and highlighted in the code through the commented lines. They did not what I hoped to find, since they just removed the spike line entirely.

Upvotes: 1

Views: 46

Answers (0)

Related Questions