- Contents
- Examples
- Installation
- FAQ
- Support
- Develop

# Examples gallery

Below are examples of the different things you can do with lmfit. Click on any image to see the complete source code and output.

We encourage users (i.e., YOU) to submit user-guide-style, documented, and preferably self-contained examples of how you use lmfit for inclusion in this gallery! Please note that many of the examples below currently do not follow these guidelines yet.

Fit with Data in a pandas DataFrame

Fit with Data in a pandas DataFrame

Using an ExpressionModel

Using an ExpressionModel

Fit Using Inequality Constraint

Fit Using Inequality Constraint

Fit Using differential_evolution Algorithm

Fit Using differential_evolution Algorithm

Fit Using Bounds

Fit Using Bounds

Fit with Algebraic Constraint

Fit with Algebraic Constraint

Fit Specifying Different Reduce Function

Fit Specifying Different Reduce Function

Building a lmfit model with SymPy

Building a lmfit model with SymPy

Fit comparing leastsq and basin hopping, or other methods

Fit comparing leastsq and basin hopping, or other methods

Fit Multiple Data Sets

Fit Multiple Data Sets

Fit Multiple Data Sets Using Model Interface

Fit Multiple Data Sets Using Model Interface

Fit using the Model interface

Fit using the Model interface

Fit Specifying a Function to Compute the Jacobian

Fit Specifying a Function to Compute the Jacobian

Outlier detection via leave-one-out

Outlier detection via leave-one-out

Fitting data with uncertainties in x and y

Fitting data with uncertainties in x and y

Complex Resonator Model

Complex Resonator Model

Model Selection using lmfit and emcee

Model Selection using lmfit and emcee

Benchmarks of methods with and without computing the Jacobian analytically

Benchmarks of methods with and without computing the Jacobian analytically

Calculate Confidence Intervals

Calculate Confidence Intervals

Fit Two Dimensional Peaks

Fit Two Dimensional Peaks

Global minimization using the brute method (a.k.a. grid search)

Global minimization using the brute method (a.k.a. grid search)

Gallery generated by Sphinx-Gallery