Fluctuation in the fitting function

Recently, when I was fitting the data with a function, I found something strange to me. Just after fitting the histogram when I draw, it shows some small fluctuation(noise) in the fitting function. But when I save the histogram in a root file after fitting and plot it later the noise was gone and the fitting function was smooth. I am attaching the two plots below. So what can be the reason behind this?
Thank you!

ROOT Version: 6.16
Platform: Mac OS
Compiler: Not Provided

These are two different data sets.

Hi, Wile_E_Coyote,
No these are the same data points. The histograms are the same too. I have just zoomed the axis of the first plot a little bit.

Thank you.

Compare the “y” values at around “x=1”.

Hi Wile_E_Coyote,
I am attaching the two figures again.

Now you can see the fluctuation in the function mostly in the lower region of x in Fig-1.

Thank you

Can you try, right after you create the “fit function”: fit_function->SetNpx(500);