Hi,
I have different surfaces that I want to display in one 3D graph as one big surface, but the problem is that they each have their own colorscale. How can I get a unique colorscale for the whole surface (composed of all the subsurfaces) ?
Here is my code:
surface_involute1_uniform = go.Surface(x=x_involute_uniform, y=z_uniform_involute, z=y_involute_uniform, showscale=False)
surface_involute2_uniform = go.Surface(x=-x_involute_uniform, y=z_uniform_involute, z=y_involute_uniform, showscale=False)
surface_parab1_uniform = go.Surface(x=x_parab_uniform, y=z_uniform_parab, z=y_parab_uniform, showscale=False)
surface_parab2_uniform = go.Surface(x=-x_parab_uniform, y=z_uniform_parab, z=y_parab_uniform, showscale=False)
surface_involute1_inc = go.Surface(x=x_involute_var, y=z_inc_involute, z=y_involute_var, showscale=False)
surface_involute2_inc = go.Surface(x=-x_involute_var, y=z_inc_involute, z=y_involute_var, showscale=False)
surface_parab1_inc = go.Surface(x=x_parab_var, y=z_inc_parab, z=y_parab_var, showscale=False)
surface_parab2_inc = go.Surface(x=-x_parab_var, y=z_inc_parab, z=y_parab_var, showscale=False)
surface_involute1_dec = go.Surface(x=x_involute_var, y=z_dec_involute, z=y_involute_var, showscale=False)
surface_involute2_dec = go.Surface(x=-x_involute_var, y=z_dec_involute, z=y_involute_var, showscale=False)
surface_parab1_dec = go.Surface(x=x_parab_var, y=z_dec_parab, z=y_parab_var, showscale=False)
surface_parab2_dec = go.Surface(x=-x_parab_var, y=z_dec_parab, z=y_parab_var, showscale=False)
data = [surface_involute1_uniform, surface_involute2_uniform,
surface_involute1_inc, surface_involute2_inc,
surface_involute1_dec, surface_involute2_dec,
surface_parab1_uniform, surface_parab2_uniform,
surface_parab1_inc, surface_parab2_inc,
surface_parab1_dec, surface_parab2_dec]
layout = go.Layout(
title='Parametric Plot',
scene=dict(
xaxis=dict(
gridcolor='rgb(255, 255, 255)',
zerolinecolor='rgb(255, 255, 255)',
showbackground=True,
backgroundcolor='rgb(230, 230,230)'
),
yaxis=dict(
gridcolor='rgb(255, 255, 255)',
zerolinecolor='rgb(255, 255, 255)',
showbackground=True,
backgroundcolor='rgb(230, 230,230)'
),
zaxis=dict(
gridcolor='rgb(255, 255, 255)',
zerolinecolor='rgb(255, 255, 255)',
showbackground=True,
backgroundcolor='rgb(230, 230,230)'
)
)
)
fig = go.Figure(data=data, layout=layout)
plotly.offline.plot(fig, filename='Parametric_plot')
Thank you,
Antoine