Hi,
I have two traces as below trace1 and trace2. I want to make a vertical line at a particular x value which is in events_i[0].
How do i plot a vertical line at a particular x point, possibly multiple X points which will be from an array which span the entire plot vertically.
I tried using shapes but it is not working.
trace1 = go.Scatter(
x = df123.index,
y = df123[‘1_RSRP0’],
name = ‘1_RSRP0’,
xaxis=‘x1’,
mode =‘markers’
)
trace2 = go.Scatter(
x = df123.index,
y = df123[‘2_RSRP0’],
name = ‘2_RSRP0’,
xaxis=‘x1’,
mode =‘markers’
)
data = [trace0,trace1,trace2]
layout = Layout(
title=“RSRP v time”,
yaxis=YAxis(
title = “db”
),
xaxis=XAxis(
title= ‘time’
)
)
fig = Figure(data=data,layout=layout)
iplot(fig)
I am able to plot it using cufflinks with below command, however i wish to do it with plotly , as I have many more customizations to add on plot which are not available in cufflinks yet.
df123.iplot(x = ‘time’ , y = [‘P_RSRP0’ , ‘1_RSRP0’,‘2_RSRP0’ ] , mode =‘lines+markers’,vline = events_i[0])
Can someone please help ?
-Thx
Jay