Hi,
I have a sample 3d plot (shown in the following) and as you see the side walls (Backgrounds) are colored.
import plotly.graph_objects as go
import numpy as np
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))
fig = go.Figure()
fig.add_scatter3d( x = x, y = y, z = z,
mode = 'markers',
marker = dict( color = 'rgba(0,0,0,0.3)', size = 3)
)
fig.update_layout(
autosize = False,
xaxis = dict(
zeroline = False,
showgrid = False,
showline=True, linecolor='black',
),
yaxis = dict(
zeroline = False,
showgrid = False ),)
# xaxis.backgroundcolor is used to set background color
fig.update_layout(scene = dict(
xaxis = dict(
backgroundcolor="rgb(200, 200, 230)",
gridcolor="white",
showbackground=True,
zerolinecolor="white",),
yaxis = dict(
backgroundcolor="rgb(230, 200,230)",
gridcolor="white",
showbackground=True,
zerolinecolor="white"),
zaxis = dict(
backgroundcolor="rgb(230, 230,200)",
gridcolor="white",
showbackground=True,
zerolinecolor="white",),),
margin=dict(
r=10, l=10,
b=10, t=10),
height = 1000,
width = 1000,
showlegend = False
)
fig.show()
Let me know how can I plot a 2d plot (For example using scatter or bar or β¦) on one of the walls (For example on xz side wall?
Thanks in advance.