Hi @Bijan,
To add a plot on the scene walls compute after x, y, z definition their min and max values:
t = np.linspace(-1, 1.2, 500)
x = (t**3) + (0.3 * np.random.randn(500))
y = (t**6) + (0.3 * np.random.randn(500))
z=(t**2) + (0.3 * np.random.randn(500))
xm, xM= x.min(), x.max()
ym, yM= y.min(), y.max()
zm, zM= z.min(), z.max()
Then if you want to plot the graph of the function z=sin(2*x)
on the wall of equation y=ym
define:
xg=np.linspace(-np.pi/4, 2*np.pi/3, 50) #xm <=-pi/4 <2pi/3<=xM
zg=np.sin(2*xg)
yg=(ym+0.05)*np.ones(x.shape)# I added 0.05 to ym to make the graph visible. Plotting it exctly
# on the plane y=ym can make it a fuzzy graph
fig.add_traces(go.Scatter3d(x=xg, y=yg, z=zg, mode="lines", line_color="red", line_width=3))
Now if you want to plot a bar chart on the wall x=xm+0.05 you cannot instantiate go.Bar
, because it works only in 2d, not in 3d.
To get the bars you should triangulate them and plot as a mesh3d, as it is explaine here:
https://community.plotly.com/t/adding-a-shape-to-a-3d-plot/1441