How to draw vertical lines on a given plot in matplotlib

Given a plot of signal in time representation, how to draw lines marking corresponding time index?

Specifically, given a signal plot with time index ranging from 0 to 2.6(s), I want to draw vertical red lines indicating corresponding time index for the list [0.22058956, 0.33088437, 2.20589566], how can I do it?

6 Answers
6

Leave a Comment