How to plot vertical lines in plotly offline?
问题 How would one plot a vertical line in plotly offline, using python? I want to add lines at x=20, x=40, and x=60, all in the same plot. def graph_contracts(self): trace1 = go.Scatter( x=np.array(range(len(all_prices))), y=np.array(all_prices), mode='markers', marker=dict(size=10, color='rgba(152, 0, 0, .8)')) data = [trace1] layout = go.Layout(title='Market Contracts by Period', xaxis=dict(title='Contract #', titlefont=dict(family='Courier New, monospace', size=18, color='#7f7f7f')), yaxis