because you didn't share your data i tried to solve the answer with a sample code snippet from plotly:
import plotly.express as px
df = px.data.stocks()
fig = px.line(df, x='date', y="GOOG")
fig.add_vline(x='2019-01-25')
fig.show()
I have added the following line to my code before fig.show():
fig.add_vline(x='2021-01-25')
If my date format differs from yours, you get it by printing your graph input:
print(df)
date ...
0 2018-01-01 ...
1 2018-01-08 ...
2 2018-01-15 ...
3 2018-01-22 ...
4 2018-01-29 ...
... ...
If you need more info and examples check: https://plotly.com/python/horizontal-vertical-shapes/
My result chart
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…