Updated waveform plotting