Why do you use the default parameters? Of which function, PlotWaveform or AutoPowerSpectrum? Did you try dt = 1.0 / sampling_rate?
Could you just show the relevant lines of code?
You may also want to have a look at the example programs, e.g., thd.cws (samples/analysis)