DFT calculations returning different results
Make sure you use the same scaling and X and Y axis so you compare apples to apples. The upper graph is in power the lower seems to be amplitude
Start with a known signal with a known answer. A sine wave or square wave for example and compare the outcome with the expected result.