The axvline method of Axes is an option, seems to be overlooked in the existing answers.
https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.axvline.html