Data Science, Condition Monitoring, Chemical Engineering.
jupyter-notebooks fig, ax = plt.subplots(figsize=(20, 5)) ax.axhline(y=thresh, color='k', linestyle=':') ax.plot(signal) greater_than_threshold = [i for i, val in enumerate(signal) if val>thresh] ax.plot(greater_than_threshold, signal[greater_than_threshold], linestyle='none', color='r',