I have a timeseries plot in plotly and list of timestamps for which I want to create a vertical line on my plotly plot. I understand that vertical line can be drawn using shape as follow:

‘shapes’: [

# Line Vertical

{

‘type’: ‘line’,

‘x0’: 1,

‘y0’: 0,

‘x1’: 1,

‘y1’: 2,

‘line’: {

‘color’: ‘rgb(55, 128, 191)’,

‘width’: 3,

},

}

But this method doesn’t scale if the number of vertical lines is more like 10 or so. In matlotlib I use to plot vertical line as follow:

xcoords = [timestamp1, timestamp2, timestamp3]

for xc in xcoords:

plt.axvline(x=xc)

Is there any equivalent command in plotly such that I can draw a vertical line from a list over plotly plots.