# 6.10.12 Add multiple fitted curves in a Histogram

## Summary

Origin allows you to fit the peaks from the result of frequency count. Also, fitted curves can added into the new layer in the Histogram.

## What you will learn

• Plotting the Histogram
• Using Frequency Count to do statistics
• Using Multiple Peak Fit tool to find peaks and do fitting

## Steps

Copy and paste the sample data into Origin and set the column as Y (Highlight the column and choose Column: Set As: Y from the Origin menu). Plot this data as a Histogram by clicking from the menu.

### Frequency Count

1. Highlight the sample data, then open the Frequency Count dialog by selecting .
2. Click OK to finish. A new result sheet will be generated.

### Fit peaks

1. Select Col(Counts) in FreqCounts1 sheet and then open the Multiple Peak Fit dialog from Analysis: Peak and Baseline: Multiple Peak Fit.
2. In the dialog that opens, choose Gaussian for Peak Function and click OK.
3. A graph window is generated automatically for you to pick peaks from the graph. Double click at the peak center to pick up a peak. Pick two peaks one by one this way.

Note: you can single click at the peak center and then use Left and Right arrow keys on the keyboard to slightly adjust the center. Once done, press Enter key to confirm.
4. We need to fix the baseline at Y = 0. To do this, click Open NLFit button to open Nonlinear Curve Fit dialog. Go to Parameters tab. Set Value of parameter y0 to 0 and check Fixed cehckbox. Click Fit button to perform the fitting.
 If your baseline is complicated, or if you would like Origin to auto find peaks by specified method, please use Peak Analyzer (open from Analysis: Peaks and Baseline: Peak Analyzer). Note that Peak Analyzer provides powerful controls appropriate not just in two cases mentioned.
5. Two sheets nlfitpeaks1 and nlfitpeaksCurve1 are added to the source workbook containing the fitting report and the fitted curve data.