I need a single line to change color from point to point as it moves to the right in a spectral manner. Is this possible with Plotly and is there an example? I am able to do this using Bokeh.
Solved this one by making 50 little lines using:
for x in range(1, 100, 2):
fig.add_trace(go.Scatter(x=[x-1, x, x+1],
y=pctg[x-1:x+2],
line={'color': self.dash.palette[int(x*2.56)]
If there were another cleaner way, that would be cool.
Recollecting now, I am pretty sure this is how I did it with Bokeh
At the moment, we donβt support coloring individual line segments within a line with different colors, so the way you did it above would be the best way forward today.