Data.annotate_fit

Data.annotate_fit(model, x=None, y=None, z=None, text_only=False, **kargs)

Annotate a plot with some information about a fit.

Parameters

mode (callable or lmfit.Model) – The function/model used to describe the fit to be annotated.

Keyword Parameters:
x (float):

x co-ordinate of the label

y (float):

y co-ordinate of the label

z (float):

z co-ordinbate of the label if the current axes are 3D

prefix (str):

The prefix placed ahead of the model parameters in the metadata.

text_only (bool):

If False (default), add the text to the plot and return the current object, otherwise, return just the text and don’t add to a plot.

prefix(str):

If given overridges the prefix from the model to determine a prefix to the parameter names in the metadata

Returns

(Datam, str) – A copy of the current Data instance if text_only is False, otherwise returns the text.

If prefix is not given, then the first prefix in the metadata lmfit.prefix is used if present, otherwise a prefix is generated from the model.prefix attribute. If x and y are not specified then they are set to be 0.75 * maximum x and y limit of the plot.