I have a figure with multiple traces in it with different opacity and same color(green). The lines in my plot are overlapping, therefore I need some opacity of the lines, which than indicates another level of data. Now I want to add a colorbar, which goes from low opacity green to high opacity green. And I want to configure the labels to be words, for example high & low.
fig = go.Figure()
for i in list:
fig.add_trace(go.Scatter(x=df.loc[i]['x'], y=df.loc[i]['y'], name=i,
line=dict(color='forestgreen', width=2), opacity=df_Transparency.loc[i][0]))
fig.show()
Everything I found only works for only the color or for matplotlib. "python matplotlib legend for opacity" is an example is how it is done in matplotlib.
I want something similar like this:
]
And I tried with marker dict, but doesn't work as well.
marker=dict(
size=5,
color='forestgreen',
colorbar=dict(
title="Colorbar"
),
)
Does someone know if it is possible to do it and how?
I guess you can use