3D plot does not show markers, axis labels

Came back to plotly and wanted to try some simple 3d visualization of orientation axes, but failed spectacularly.
The output I get does not show any markers, does not show axis labels, does not show axis ticks or values and I cannot figure out why.

Here is the code:

import numpy as np
import plotly.graph_objects as go


ps = np.array([
    [0,0,0],
    [1,0,0],
    [0,1,0],
    [0,0,1]
])

fig = go.Figure()

fig.add_trace(
    go.Scatter3d(
        x=ps[:,0],
        y=ps[:,1],
        z=ps[:,2],
        mode='lines+markers',
        marker={
            'size': 100,
            'symbol': 'circle',
        },
    )
 )

fig.update_layout(
    title='No Markers, no axis labels, no ticks, no axis values???', 
    autosize=False,
    width=500, 
    height=500,
    scene=dict(
        xaxis = dict(nticks=5, range=[-2,2]),
        yaxis = dict(nticks=5, range=[-2,2]),
        zaxis = dict(nticks=5, range=[-2,2]),
        xaxis_title='X Axis Title',
        yaxis_title='Y Axis Title',
        zaxis_title='Z Axis Title',
    ),
)

fig.show()
import plotly
plotly.__version__

And here is the output:

When I use “markers” instead of “lines+markers” I get a completely empy, unlabeled, undecorated plot.

What am I doing wrong?

Hey @johann.petrak try reducing the marker size to a smaller number, let’s say 5.

Other than that, I can’t reproduce the issue on ubuntu, plotly 5.18.0

I actually had 5 originally and increased it for testing. Does not show with any size.

So I created a completely new environment and got the problem there too.
Turns out this is related to my Firefox browser or perhaps some extension installed into it. It works with Chrome and it works with a different profile for that Firefox version.
Nothing is showing up on the console though that would not also show up in the version where it works.

UPDATE: still does not show even after disabling all extensions. So weird.

Now that you mention this, I had problems with Firefox in combination with 3D plots as well when I was working remotely on a linux server. Back than there was a problem with openGL drivers.

1 Like