Added scaling for drawing waveform