Slope charts in plotly

Hi @mbkupfer, here is an example below to get you started. It uses the text attribute of go.Scatter and the possibility to control text position with textposition. Vertical lines are shapes, but you could also use just the y axis for this. To customize and tune the aspect of your plot, you can read the tutorials on

import plotly.graph_objects as go
fig = go.Figure(go.Scatter(x=[0, 1], y=[10, 6], mode='lines+markers+text', 
                           text=['start', 'end'], textposition=['middle left', 'middle right']))
fig.add_shape(type='line', x0=0, x1=0, y0=0, y1=1, xref='x', yref='paper')
fig.add_shape(type='line', x0=1, x1=1, y0=0, y1=1, xref='x', yref='paper')
fig.show()
3 Likes