plot_alg_decay_fit
full name: tenpy.tools.fit.plot_alg_decay_fit
parent module:
tenpy.tools.fit
type: function
- tenpy.tools.fit.plot_alg_decay_fit(plot_module, x, y, fit_par, xfunc=None, kwargs={}, plot_fit_args={})[source]
Utility function used the plot an algebraic fit function next to the data.
- Parameters:
plot_module – This is either the module
matplotlib.pyplot
or an instance ofmatplotlib.pyplot.subplot
.x (array_like [M]) – The (real-valued) data.
y (array_like [M]) – The (real-valued) data.
fit_par (tuple(float, float, float)) – The fit parameters
(a, b, c)
, e.g. as returned byalg_decay()
.xfunc (callable, optional) – If given, this function is used to scale the x-axis of the plot.
kwargs (dict) – Keyword arguments that are passed to the
plot_module.plot
function.plot_fit_args (dict) –
A dictionary that controls how the fit is shown via the following key value pairs:
=================== ====== ========= ======================================================================= key type default description =================== ====== ========= ======================================================================= show_data_points bool True If the datapoint `x`, `y` should be plotted. ------------------- ------ --------- ----------------------------------------------------------------------- n_interp int 30 The number of points to plot for the fit. ------------------- ------ --------- ----------------------------------------------------------------------- show_fit bool True If the fit should be plotted. ------------------- ------ --------- ----------------------------------------------------------------------- extrap_line_start int -2 Define the start of the extrapolation line as ``x[extrap_line_start]``. ------------------- ------ --------- ----------------------------------------------------------------------- extrap_line_end int ... Define the end of the extrapolation as ``x[extrap_line_end]``. Per default, it ends at the end of the x-axis. =================== ====== ========= =======================================================================