Got waveform plotted properly, it looks ugly but beautiful.