# show fit information on plot

After performing a fit in Mathematica, I would like to show the fitted parameters in a box on the plot showing the fitted function. How would I go about achieving that?

Here is a MWE:

func[a_, b_, x_] := a*x + b;
nlm = NonlinearModelFit[{{1, 1}, {5, 5}, {2, 3}}, func[
a,
b,
x],
{{a, 1}, {b, 0}}, x];

Plot[Normal[nlm[t]], {t, 0, 1.0}, PlotRange -> Full]
nlm["ParameterTable"]

• You can start from Plot[Normal[nlm[t]], {t, 0, 1.0}, PlotRange -> Full, Epilog -> Inset[nlm["ParameterTable"]]] and read the docs. Mar 31 '14 at 9:29

As b.gatessucks comments you can use inset. You can also use PlotLegends and customize, e.g.

tab = nlm["ParameterTable"]
plt = Show[
Plot[nlm[t], {t, 0, 5}, PlotRange -> Full,
PlotLegends ->
Placed[LineLegend[{Blue}, {Normal@nlm[t]},
LegendMarkerSize -> {50, 3},
LegendFunction -> (Column[{#, tab}, Frame -> True] &)], {0.3,
0.8}], Frame -> True],
ListPlot[{{1, 1}, {5, 5}, {2, 3}}, PlotMarkers -> {Automatic, 10}],
PlotRange -> All, ImageSize -> 500] 