I was wondering if there is a way to let plotly automatically choose a default uniform color for Cone or Surface plots like it does for Mesh3d ?
I know I can specify
min=max but then I have to specify the color explicitly, to differentiate multiple traces.
I also know I could use PLOTLY_DEFAULT_COLORS but this implies that I know the trace index, which in my case is not available at trace creation time.
Here an example with cones
from plotly import graph_objects as go color1 = 'blue' color2 = 'red' fig = go.Figure() fig.add_cone(x=, y=, z=, u=[-1], v=, w=, colorscale=[[0, color1], [1,color1]], showscale=False) fig.add_cone(x=, y=, z=, u=[-1], v=, w=, colorscale=[[0, color2], [1,color2]], showscale=False) fig.show()