In this lesson, we will use gadgets to perform exploratory analysis of data in a graph.

1. Start with the project saved from the previous lesson and add a new folder named Gadgets at the root level in Project Explorer, then go to that folder.
2. With the new workbook active, click the Import Single ASCII button on the Standard toolbar and import the file <Origin EXE Path>\Samples\Curve Fitting\Multiple Gaussians.dat.
3. We will add long names for the datasets. Enter "Peak 1" in the Long Name label row of column B. Click and select the long name cell. Then move the mouse to the lower-right corner of the cell so that the cursor changes to "+". Click the left mouse button and drag from column C to E. Origin will auto-fill the names as Peak 2, Peak 3 and Peak 4.
4. Click and drag on the column headers to highlight columns B to E. From the main menu, select Plot > 2D: Multi-Y: Stacked Lines by Y Offsets to create a stacked lines graph.
5. With the graph active, select Gadgets: Integrate... from the main menu.
6. Accept the default settings and press the OK button. A region-of-interest (ROI) box will be placed on the graph. Move and/or resize the ROI to cover a desired range of the data.
7. Click on the triangle button at the top-right corner of the ROI box and select Preferences to re-open the dialog.
8. In the Output tab, expand the Output Quantities to branch and select the Append to Worksheet check box . Click OK to close the dialog box.
9. When there are multiple plots in a layer, the gadget acts on the active data plot by default. In this case, the active plot is Peak 1. To change the data to Peak 3 for example, click on the triangle button at the top-right corner of the ROI box and select Change Data: Plot(3): Peak 3 from the context menu.
10. Click on the triangle button again and select New Output for All Curves. A workbook with integration results for all curves will be generated. Click the triangle button and select Go to Report Worksheet to switch to the output workbook.
11. Click the X button at the top-right corner of the ROI box in the graph to remove the gadget.