Can we show a fitting function on a plot?

Dear experts:

After we fit some data, we can see the parameters in the terminal.
Can we show the fitting function on a lot, like y=2*x+5, or something.

Thanks a lot.

Hi,

How do you fit the data? Some of the interfaces will let you add an option to draw the result or you can simply draw the resulting function. For example see $ROOTSYS/tutorials/fit/fithist.C

Philippe.

Thank you so much!

Best!

Fada

you can get the resulting fitted parameters to an array.

for histograms:
ftp://root.cern.ch/root/doc/5FittingHistograms.pdf
p72. “Access to the Fit Parameters and Results”

it is almost the same for graphs