Optimizing waveform plot for adding and removing waveforms.