Added WavePlot generation code from waveplot-client.