plot_threshold function

Threshold levels through time