Origin Software Tutorials
Origin Software Tutorials
Introduction
Origin is the data analysis and graphing software of choice for over half a million scientists and
engineers in commercial industries, academia, and government laboratories worldwide.
Origin offers an easy-to-use interface for beginners, combined with the ability to perform
advanced customization as you become more familiar with the application.
Origin graphs and analysis results can automatically update on data or parameter change,
allowing you to create templates for repetitive tasks or to perform batch operations from the user
interface, without the need for programming.
Graph Types
1. Launch Origin. You will see an empty workbook with one worksheet containing two
columns.
2. Click Help: Open Folder: Samples Folder and browse to \Curve Fitting\Sensor01.dat.
Drag the file to the Origin workbook.
3. Now let us create a graph. Click on the header of column B to select the entire column.
Then click the Line button in the 2D Graphs toolbar docked at the bottom left of the
interface. A graph window will open, with the data plotted as a line.
1. We will now do some simple customization of the graph. Click on the X axis, and in
the pop-up Mini Toolbar, click the Show Gridlines button to select Both in the drop-
down list. This will add major and minor grid lines for the X axis. Do the same for Y
axis.
2. Click on the line plot. In the pop-up Mini Toolbar, click the Line Color button to
change the line color to Blue.
3. Change the width to 3 by using the the Line Thickness drop-down list in the Mini
Toolbar.
4. Single-click inside the layer, but not on the grid lines or plot. You may need to click
once to deselect your plot and then again to select the layer. The graph layer will be
selected, and this will be indicated by selection handles. Change the layer background
color to LT Yellow by using the Layer Background Color button on the Mini
Toolbar. Your graph should look like below:
Explore data graphically
1. Let us now explore the data graphically. Make sure the graph window is active by
clicking on the title bar.
o Hold the Z key down and use the mouse wheel to zoom in and out on the X axis.
o Hold the X key down, and use mouse wheel to pan across the x axis.
2. Hover your cursor on a point of the curve and a Data Point tooltip will show.
Save the Project
We will now save this Origin project for later use.
1. Move mouse over to the Project Explorer bar on the left side of the work space to expand
it.
2. Right click on the Folder1 in the upper folders panel and choose Rename from the
context menu. Type My First Graph to rename the folder.
3. Choose menu File: Save Project to save the project. Give the project a name such
as Getting Started Tutorials.
Files created by the user such as projects, graph templates, fitting functions etc are
by default saved in the User Files Folder (UFF). You can access the UFF and other
useful folder locations with the main menu Help: Open Folder.
In this lesson we will learn about graph templates, and also how to perform batch plotting.
Graph Templates
Let's start with the project file we saved in lesson one: My First Graph. Click to select the
graph window.
You can quickly open recently-saved project files from the File: Recent Projects list.
1. Click on the X axis, in the pop-up mini toolbar, click the Show Opposite Axis button to
show the Top X axis. Do the same for Y axis to show the Right Y axis.
2. Now let's save the graph as a template. Right-click on the graph title bar, and
choose Save Template As... from the context menu.
3. In the dialog, set the Template Name as My Line and click OK to save the template.
4. We will now generate a new column of data. Activate the worksheet, right-click on the
gray area to the right of the columns, and select Add New Column from the context
menu.
5. Click inside the F(x) cell of this column, then right-click and select Open Dialog... from
the context menu. You can use the shortcut Ctrl+Q instead of the context menu.
6. In the dialog, enter the following expression into the top panel:
Mmovavg(B,2)
In this dialog, use the Formula: Load Samples menu to view various examples on
setting column values. And, the Function menu offers a large selection of functions.
You can also search for suitable functions using the search button located in the top
right side of the formula edit box.
7. Click OK to close the dialog and return a dataset of modified moving averages using
column B data, starting at row 2. Type MMovAvg into the Long Name cell of the
column.
8. Click on the header of column C to select the entire column. From the menu,
choose Plot: My Templates and select the My Line template we created before. A new
graph will be created using data from column C.
Batch Plotting
In this section, we will perform batch plotting by first creating one graph and then cloning
that graph using other data.
1. Go to Project Explorer. In the upper panel, right-click on the root level and choose New
Folder.
2. Right-click on newly created folder, select Rename, and assign the name Batch Plotting.
Click on the empty folder to open it.
3. Select Help: Open Folder: Program Folder to open the Origin program folder, find and
open the \Samples\Import and Export\ subfolder. Press the Shift key and choose the
following three files:
o S15-125-03.dat o S21-235-07.dat o
4. Drag and drop the selected files onto the Origin workspace. The selected files are
imported into three new workbooks.
Note: To import data files by drag-and-drop, you must not be running Origin as an administrator.
5. Select one of the workbooks, then click on the header of column B and drag the mouse to
column D, selecting all three columns. Then select the menu: Plot > Multi-Panel/Axis:
3Ys Y-YY.
Origin will look to the left of the selection to find the X column and plot the selected
data against the the 1st column in the worksheet.
6. Right-click on one plot and select Change Plot to: Line from the context menu to
change the plot type of selected plot to Line.
Click on the plot, in the pop-up mini toolbar, Change the width to 3 by using the the Line
Thickness drop-down list .
Then, do the same for other two plots to get the following line graph.
7. Now we will clone this graph using data in the other workbooks. Right-click on the title
bar of the graph and select Duplicate(Batch Plotting), and then the Select
Workbook dialog will be opened.
8. In the dialog, press the Shift key and select the two workbooks in the top box.
9. Click OK. If prompted to rescale the axes to show all data, answer Yes and click OK.
Two similar graphs will be created with data from the other two books.
10. From the menu, choose File: Save Project and save your modified project.
In this lesson we will learn about flexible ways of selecting data for plotting.
Plotting Data from Multiple Worksheets
1. Let's start with the project we saved in lesson two: Graph Templates and Batch Plotting.
Select any workbook, and make sure no data columns are selected. You can click in the
gray area outside of columns to remove selection.
2. Select menu Plot > Basic 2D: Line. The Plot Setup dialog will open.
3. Click the button on the right side to expand the upper panel if it is not already open.
4. Set the Available Data: drop-down list in the left panel to Worksheets in Folder.
To pick up worksheets from anywhere in your project, set the drop down
to Worksheets in Project.
5. Hold down shift key and select all three data sheets named Trial Run 1, Trial Run
2 and Trial Run 3.
6. Using the check boxes in the middle panel, assign Time as X and Position as Y.
Click OK button to create the graph.
This dialog has a third bottom panel which can be used to assign data to different
layers in a multi-layer graph. If that panel is open, you can simply collapse it and
then click OK to create the graph.
7.
8. We will now customize the legend for this graph. Right click on the legend and
select Legend: Update Legend...
9. In the dialog that opens, set Auto Legend Transition Mode as Custom. Clear
the Legend Custom Format (@D, @LU etc) edit box and then click the button on
the right of this edit box, and in the fly-out menu select @WS: Sheet Display Name.
10. In the edit box, type a hyphen - after the string@WS, and again click the right arrow
button. This time select @LD"Sample": Sample, which corresponds to column header
row Sample in the worksheet. Click the OK button. The legend will now display the
sheet name and the sample name.
Using another Column to Set Color of a Plot
1. Go to Project Explorer. In the upper panel, right-click on the root level and choose New
Folder.
2. Right-click on newly created folder, select Rename, and assign the name Data Selection.
Click on the empty folder and open it.
3. Start with an empty worksheet. Select Help: Open Folder: Sample Folder... to open the
"Samples" folder. In this folder, open the Graphing subfolder and find the file US Mean
Temperature.dat. Drag-and-drop this file into the empty worksheet to import it.
4. We want to plot the positions of US major cities (columns Longitude and Latitude) as a
scatter plot and then colormap the data points with the annual mean temperature
(column Annual). Click on the header of column named January and drag and expand
the selection all the way to the column named December. Then right click to
choose Hide/Unhide Columns: Hide.
5. Select the Longitude columns, then right-click and select Set As: X.
6. Select the Latitude and click Scatter button on the bottom left toolbar to create the
plot of longitude vs. latitude.
7. Click on the plot, in the pop-up mini toolbar, click the Symbol Edge Color button to
expand the color chooser, switch to the By Points tab. In this tab, click the Color
Mapping drop-down and select Col(P): "Annual" in the list. The symbol color will be
mapped to the column Annual.
8. Let us now set the axes lengths to scale with the range of X and Y values represented in
the graph. Click on the white space of the layer to select the layer, in the pop-up mini
toolbar, click Layer Dialogs button to select Properties from the fly-out menu.
The Plot Details dialog will be opened and with the Layer1 node been selected on the left
panel. Then go to the Size tab on the right side. Check the Link Axis Length to Scale
with X:Y Ratio box and keep the ratio as 1. Click OK to exit the dialog and see the
effect.
You also can double-click on the white space of the layer to open the Plot
Details dialog with the Layer1 node been selected on the left panel.
9. Now, let us select another color palette to apply it to the symbol color as colormap. Click
on any data point in the graph, and then click on the Palette toolbar button in
the Style toolbar. Select the Temperature palette to better reflect the data. Click anywhere
on the graph to deselect the plot.
You can add a map to a graph using the Maps Online App. This blog post is a good
place to start.
10.
11. From the menu, choose File: Save Project and save your modified project.
5. Press OK to import the file. Then go to the first sheet named Oil. Hold the Ctrl key to
select Crude Oil Production, Oil Consumption and Total Oil Production columns.
In this lesson we will learn about flexible ways of selecting data for plotting.
Plotting Data from Multiple Worksheets
1. Let's start with the project we saved in lesson two: Graph Templates and Batch Plotting.
Select any workbook, and make sure no data columns are selected. You can click in the
gray area outside of columns to remove selection.
2. Select menu Plot > Basic 2D: Line. The Plot Setup dialog will open.
3. Click the button on the right side to expand the upper panel if it is not already open.
4. Set the Available Data: drop-down list in the left panel to Worksheets in Folder.
To pick up worksheets from anywhere in your project, set the drop down
to Worksheets in Project.
5. Hold down shift key and select all three data sheets named Trial Run 1, Trial Run
2 and Trial Run 3.
6. Using the check boxes in the middle panel, assign Time as X and Position as Y.
Click OK button to create the graph.
This dialog has a third bottom panel which can be used to assign data to different
layers in a multi-layer graph. If that panel is open, you can simply collapse it and
then click OK to create the graph.
7.
8. We will now customize the legend for this graph. Right click on the legend and
select Legend: Update Legend...
9. In the dialog that opens, set Auto Legend Transition Mode as Custom. Clear
the Legend Custom Format (@D, @LU etc) edit box and then click the button on
the right of this edit box, and in the fly-out menu select @WS: Sheet Display Name.
10. In the edit box, type a hyphen - after the string@WS, and again click the right arrow
button. This time select @LD"Sample": Sample, which corresponds to column header
row Sample in the worksheet. Click the OK button. The legend will now display the
sheet name and the sample name.
Using another Column to Set Color of a Plot
1. Go to Project Explorer. In the upper panel, right-click on the root level and choose New
Folder.
2. Right-click on newly created folder, select Rename, and assign the name Data Selection.
Click on the empty folder and open it.
3. Start with an empty worksheet. Select Help: Open Folder: Sample Folder... to open the
"Samples" folder. In this folder, open the Graphing subfolder and find the file US Mean
Temperature.dat. Drag-and-drop this file into the empty worksheet to import it.
4. We want to plot the positions of US major cities (columns Longitude and Latitude) as a
scatter plot and then colormap the data points with the annual mean temperature
(column Annual). Click on the header of column named January and drag and expand
the selection all the way to the column named December. Then right click to
choose Hide/Unhide Columns: Hide.
5. Select the Longitude columns, then right-click and select Set As: X.
6. Select the Latitude and click Scatter button on the bottom left toolbar to create the
plot of longitude vs. latitude.
7. Click on the plot, in the pop-up mini toolbar, click the Symbol Edge Color button to
expand the color chooser, switch to the By Points tab. In this tab, click the Color
Mapping drop-down and select Col(P): "Annual" in the list. The symbol color will be
mapped to the column Annual.
8. Let us now set the axes lengths to scale with the range of X and Y values represented in
the graph. Click on the white space of the layer to select the layer, in the pop-up mini
toolbar, click Layer Dialogs button to select Properties from the fly-out menu.
The Plot Details dialog will be opened and with the Layer1 node been selected on the left
panel. Then go to the Size tab on the right side. Check the Link Axis Length to Scale
with X:Y Ratio box and keep the ratio as 1. Click OK to exit the dialog and see the
effect.
You also can double-click on the white space of the layer to open the Plot
Details dialog with the Layer1 node been selected on the left panel.
9. Now, let us select another color palette to apply it to the symbol color as colormap. Click
on any data point in the graph, and then click on the Palette toolbar button in
the Style toolbar. Select the Temperature palette to better reflect the data. Click anywhere
on the graph to deselect the plot.
You can add a map to a graph using the Maps Online App. This blog post is a good
place to start.
10.
11. From the menu, choose File: Save Project and save your modified project.
5. Press OK to import the file. Then go to the first sheet named Oil. Hold the Ctrl key to
select Crude Oil Production, Oil Consumption and Total Oil Production columns.
In this lesson we will learn how to perform linear and nonlinear regression.
Linear Fit with Outliers
1. Start with the project saved from the previous lesson, and add a new folder at the root
level in Project Explorer named Curve Fitting.
2. Import the file <Origin EXE Path>\Samples\Curve Fitting\Outlier.dat.
3. Select the 2nd column and create a scatter plot.
4. Select the menu item Analysis: Fitting: Linear Fit. In the dialog that opens, accept
default settings and click OK to perform the linear fit.
5. In the graph, right-click on the fitting results table and select Quantities in Table.
Remove all entries except Intercept, Slope and Pearson's r (use CTRL + select for
multiple selections). Click OK and resize the results table as needed.
6. Now click the Mask Points on Active Plot button on the left side toolbar and mask
the point at the right bottom, which is distinctly
separated from the rest of data points.
7. The lock on the top left of the graph page turns yellow indicating that the data has
changed, but the fit results are in need of an update.
8. Hit the ESC key to switch the cursor back to pointer mode. Then click on the yellow
lock, and from the fly-out menu select Recalculate Mode: Auto. The fit results will be
updated.
9. Go back to the graph and use the masking tool to mask the outlier point towards the top.
You will notice that the results automatically update. Your graph should now look similar
to this image:
1. Start with a new workbook, and import the file <Origin EXE Path>\Samples\Curve
Fitting\Gaussian.dat.
2. Highlight the column named Amplitude and make a scatter plot.
3. Go back to workbook, highlight column named Error, then right click and select Set As:
Y Error from the context menu.
4. Place the mouse cursor close to the right edge of the highlighted column. The cursor will
change to . At this point, drag and drop the column onto the graph. The data will be
added as error bars on the scatter plot.
5. Now let's fit this data. Select the menu Analysis: Fitting: Nonlinear Curve Fit to open
then NLFit dialog.
6. In Function Selection page, set Category drop down to Peak Functions, and set
the Function drop down to Gauss.
7. Click Fit button to perform fitting and choose No in the prompt dialog, to keep the graph
window active.
8. Now we want to fix y0 as 0 and update the results. Click on the green lock on the top left
of the graph page, and select Change Parameters.
9. The dialog re-opens with the settings that were used last time the operation was
performed. Go to the Parameters tab, check the Fixed box for y0 and enter Value as 0.
10. Click the Fit button to update the file and close the dialog. From the updated table on the
graph, we can see that .
If no range selection has been made on the multiple plots, Origin will only pick up
the active data plot from the graph layer containing multiple plots. In that case you
can click the button on the right side of Input Data and select Add all plots in
active page.
10. Now click on the down arrow button beside the Summary node and choose Create
Copy as New Sheet. A new worksheet with the fit results will be added to the book.
11. Select column D, E and create a column plot to display how the amplitude parameter
(A1) changed across the three datasets.
In this lesson we will perform fitting, including deconvolution of overlapping peaks and
baseline correction.
Multiple Peak Fit with Deconvolution
1. Let's continue with the project file we saved in the previous lesson. Create a new folder in
Project Explorer, rename it as Peak Analysis, then go to the empty folder.
2. In a new workbook, import the file <Origin EXE Path>\Samples\Spectroscopy\
HiddenPeaks.dat.
3. Highlight column B and create a line plot.
4. With the graph window active, click Analysis: Peaks and Baseline: Multiple Peak Fit.
This will open the Multiple Peak Fit dialog. Set the Peak Function drop-down
as Gauss and click OK.
5. A Get Points dialog will open within the graph window. Note that you can re-position
this dialog within the window. Double-click on a peak center to select it. Select a total of
7 peaks as in the following image, including two hidden peaks:
If you click the Open NLFit button in the Get Points dialog, the NLFit dialog will
open with the peak centers initialized with your selection. You can further control
the fitting process as desired.
6. After selecting all seven peaks, click the Fit button. A fit report will be added to the
workbook.
1. This part of the lesson assumes you have OriginPro. Start with a new workbook and
import the file <Origin EXE Path>\Samples\Spectroscopy\
Peaks_on_Exponential_Baseline.dat.
2. Highlight column B and then click Analysis: Peaks and Baseline: Peak Analyzer. This
will open the Peak Analyzer dialog, and a preview window displaying the selected data.
3. In the bottom panel, select the Fit Peaks (Pro) choice under Goal. The top panel will
update, displaying a map of the steps involved in the peak fitting process.
4. Click Next. On the Baseline Mode page, select User Defined for Baseline Mode.
Click Next to go to the Create Baseline page. You can then see in the preview window
that 8 anchor points connected by a red line, are added to the spectrum. This is the
baseline created using the current settings.
Now click the Prev button to go back to the Baseline Mode page to adjust the baseline
mode settings.
7. Note that you can also select and delete anchor points. Click Done to return to the Peak
Analyzer.
8. Select the Snap to Spectrum checkbox to force anchor points to snap to the closest data
point in the spectrum. Click Next.
9. On the Create Baseline page, select Fitting for Connect by.
Select ExpDec2 for Function under the Fitting branch. Click Next twice to go to
the Find Peaks page.
10. Click the Find button. Two (2) peaks are found in the preview.
There are several options available for peak finding including a 2nd derivative
method to find overlapping peaks. You can also view the 2nd derivative curve, and
turn on smoothing to help find peaks in noisy data.
11. Click Next to go to the Fit Peaks page. Accept defaults and click Finish to perform peak
fitting. A graph containing fitting results is generated.
You can click the Fit Control button to control the fitting process including fixing
and sharing parameters, and specifying bounds and constraints.
12. Now, let's customize the Fitting Results table to hide some peak properties we don't
want to display. Right-click on the table and select Peak Report Field... from the context
menu. The Peak Report Field dialog will open, listing all properties that can be included
in the table. You can remove or change the order properties in this dialog. Select Peak
Gravity Center and click the Remove button to hide it. Do the same for Peak Area by
Integrating Data(%). Press OK to update the table in the graph.