I need to show all the labels and in my use case, some labels will be repeated. But plotly is only showing unique labels and not repeating the labels from the list
. I’ve tried with plotly.js
too.
Is this a bug? or there’s a way?
Here’s the code I ran
import plotly.graph_objects as go
import plotly.io as io
fig = go.Figure(data=
go.Parcoords(
line_color='blue',
dimensions=list([
dict(range=[1, 5],
constraintrange=[1, 2],
label='A', values=[1, 4]),
dict(range=[1.5, 5],
tickvals=[1.5, 3, 4.5],
label='B', values=[3, 1.5]),
dict(range=[1, 5],
tickvals=[1, 2, 4, 5],
label='C', values=[2, 4],
ticktext=['Label_1', 'Label_2', 'Label_1', 'Label_2']),
dict(range=[1, 5],
label='D', values=[4, 2])
])
)
)
with open("plot_tmp.png", mode="wb") as file:
image = io.to_image(fig, "png")
file.write(image)
This is the generated plot