m Corrected function for plotting and saving monitor artifact waveform