Plot waveform

Aded waveform plotting by passing data vector to gnuplot.
Speed optimisation required.