calamari.plot.plot_fit#
- calamari.plot.plot_fit(x, result, *, ax=None, n_dense=400, label=None, **style)#
Overlay a fitted model curve.
Evaluates
result(seecalamari.fitting) on a dense, evenly spaced grid spanning the range ofxand plots it – the usual “smooth curve through scattered data” overlay. Does not touch axis labels or limits, so it composes cleanly onto axes a precedingplot_*call has already labelled.- Parameters:
x (
ArrayLike) – The x-data the fit was performed over (or any range to evaluate the model across); onlymin(x)/max(x)are used.result (
FitResult) – A fit result fromcalamari.fitting.fit, evaluated viacurve().ax (
Axes|None) – The axes to overlay on – usually the return value of theplot_*call that drew the data.n_dense (
int) – Number of points in the dense evaluation grid. Default 400.**style (
Any) – Forwarded toax.plot.
- Return type:
- Returns:
matplotlib.axes.Axes– The axes drawn into.