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?