6.10.5 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
  • Adding new layers

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 Plot > Basic 2D: Histogram from the menu.

Histogram Not Fitted curve.png

Frequency Count

  1. Highlight the sample data, then open the Frequency Count dialog by selecting Statistics: Descriptive Statistcs: Frequency Count.
  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.
    MultiFittedCurve pickpeaks.png
    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.


Add the fitted curves

  1. Activate the Histogram graph and add a layer by selecting Insert: New Layer(Axes): Right-Y from the main menu.
  2. Double click the Layer2 icon to open the Layer Content dialog.
  3. Hold Ctrl key to select col("Fit Peak 1") and col("Fit Peak 2") in sheet nlfitpeaksCurve1 in the left panel, click the triangle button next to A button and select Line from the fly-out menu, and then click -> button to add it to the right panel.
  4. Click OK. Two fitted curves had been added to the Histogram.
  5. Double-click the graph to open the Plot Details dialog. Select RightY from the left panel, then open the Link Axes Scales tab in the right panel and select Straight(1 to 1) for both X Axis Link and Y axis Link. Click OK to close the dialog.
  6. The fitted curves are added into the Histogram with the proper scale. The following is the result graph, with the right Y-axis removed.
    Histogram Fitted curve.png

Sample Data

0.631
0.642
0.652
0.662
0.669
0.676
0.677
0.69
0.691
0.696
0.697
0.699
0.699
0.7
0.7
0.708
0.712
0.718
0.731
0.744
0.749
0.751
0.752
0.753
0.758
0.758
0.759
0.761
0.761
0.763
0.763
0.763
0.765
0.767
0.768
0.768
0.769
0.769
0.77
0.771
0.771
0.772
0.774
0.775
0.775
0.776
0.776
0.776
0.777
0.778
0.779
0.78
0.78
0.781
0.784
0.784
0.785
0.785
0.789
0.789
0.791
0.794
0.795
0.796
0.798
0.798
0.803
0.82
0.831