Reputation: 1
I am making a ternary plot in plotly a needed to use graph_objects because express didn't support certain things I needed to do. While I was drawing a line on my plot. Plotly ignores one of the points I give and draws a different line. Does anybody knows why and how I can fix this? Here is the minimal code example. Tie_line behaves as expected to show how it should work and Tie_line2 makes the wrong line.
The image shows figure I got with wrong data point.
import plotly.graph_objects as go
Tie_line = go.Scatterternary(a=[0.18716, 0.45514, None],
b=[0.76559, 0.0415, None],
c=[0.04725, 0.50336, None], mode='lines',
line_width=2, line_color='#0000ee', text='Tie-line 1', name="Eerste tie_line")
Tie_line2 = go.Scatterternary(a=[0.03773, 0.23891, None],
b=[0.95075, 0.0935, None],
c=[0.01152, 0.75174, None], mode='lines',
line_width=2, line_color='#ff0000', text='Tie-line', name="Tweede tie_line")
fig = go.Figure(data=[Tie_line2, Tie_line])
fig.update_ternaries(aaxis_title_text='Isopropanol', baxis_title_text='Cyclohexaan', caxis_title_text='Water')
fig.update_layout(title_text='Ternair diagram', title_x=0.465)
fig.show()
Upvotes: 0
Views: 136