Sounds simple, but I can’t get a title to show up in my Scatter3d plot. I tried various things.
Here’s an example similar to the code I struggle with:
import plotly.graph_objects as go
import numpy as np
t = np.linspace(0, 10, 50)
x, y, z = np.cos(t), np.sin(t), t*0.1
camera = dict(
up=dict(x=0, y=0, z=1),
center=dict(x=0, y=0, z=0),
eye=dict(x=1.25, y=2.75, z=2.25))
fig = go.Figure(data=[go.Scatter3d(x=x, y=y, z=z,
mode='markers')])
fig.update_layout(title = dict(text="TITLE"),
scene_camera=camera,
scene = dict(aspectmode='data', #this string can be 'data', 'cube', 'auto', 'manual'
aspectratio=dict(x=1., y=1., z=1.),
xaxis_title='X [m]',
yaxis_title='Y [m]',
zaxis_title='Z [m]'),
width=500, height=500, margin=dict(l=0, r=0, t=0, b=0))
fig.show()
I’d be happy about any help! Thanks in advance!