I have the following code as example:
x=[1,2,3,4]
y=[2,2,4,3]
colors = ["blue","blue","orange","blue"]
textures = ["","","x",""]
myfig = go.Figure()
myfig.add_trace(go.Bar(x=x
,y=y
,showlegend=True
,marker_color=colors
,marker_pattern_shape=textures
,name="my_trace"))
myfig.show()
Which produces the following figure:
I want the legend to show two names:
- One for the blue bars (lets say, named "any")
- One for the orange bars with texture (lets say, named "max" and also shows the texture)
I cannot add more traces to the plot, the point is to do it in the same unique trace.