11.8 The Interpolate GadgetGadgetInterpolate
Overview
The Interpolate Gadget performs quick interpolation on a ROI (Region of Interest) range.
With this gadget, you can:
 Easily interpolate data points on a rectangular region with the linear, cubic spline or cubic Bspline method.
 Quickly find out an interpolated Y value from any given X value.
 Output the interpolated values to Script Window, Result Log or a specified worksheet.
To Use Interpolate Gadget
To use this tool, select Gadgets: Interpolate from the Origin menu, when a graph is active.
Dialog Settings
This dialog can be opened from Gadgets: Interpolate in the Origin menu, or by selecting Preferences from the ROI flyout menu.
ROI Box

X Scale
 Specify the X data range for the ROI.
 From
 The beginning X scale value.
 To
 The ending X scale value.
 Fixed (Prevent moving by ROI)
 Fix the X scale to prevent rescaling when moving the ROI box.
Show Tool Name
 Specify whether to show the tool's name near the top of the ROI.
Fill Color
 Specify the ROI fill color.
Interpolation Line Color
 Specify the color of the interpolation line.
Interpolation Line Width
 Specify the width of the interpolation line.

Show on CenterTop of ROI Box

Choose the quantities to be displayed at the top of the ROI box.
 Y at Left
 The Y value that corresponds to the left edge of the ROI.
 Y at Right
 The Y value that corresponds to the right edge of the ROI.
 Y at Specified X
 The Y value that corresponds to an X value which you specify in the X edit box.
 X
 This edit box is available only when the Y at Specified X check box is checked.

Interpolate/Extrapolate Options

Method
 Specifies the interpolation/extrapolation method. Options include:
 Linear
 Linear interpolation is a fast method of estimating a data point by constructing a line between two neighboring data points.
 Cubic Spline
 This method splits the input data into a given number of pieces, and fits each segment with a cubic polynomial. The second derivative of each cubic function is set equal to zero. With these boundary conditions met, an entire function can be constructed in a piecewise manner.
 Cubic BSpline
 This method also splits the input data into pieces. Each segment is fitted with discrete Bezier splines.
 Akima Spline
 This method is based on a piecewise function composed of a set of polynomials. The akima interpolation is stable to outliers.
 Please see the algorithm here.
Number of Points
 Specify the number of interpolation/extrapolation points.
Boundary
 Boundary condition is available when Method is Cubic Spline. Options include:
 Natural
 The 2nd derivatives are 0 on both ends.
 NotAKnot
 The 3rd derivatives are continuous on the second and lastsecond point.
Smoothing Factor
 Available when Method is Cubic BSpline. A nonnegative parameter that specifies the smoothness of the interpolated curve in Cubic BSpline interpolation. The factor helps user control the balance between smoothing and fidelity to the actual data. Larger values will result in smoother curves.
Fit Limits To
 Specify the interpolation curve boundary.
 Interpolate to Rectangle Edge
 Interpolate to the ROI edges. If the ROI range is larger than the source data range, the interpolation will stop at the edge of the source data.
 Interpolate/Extrapolate to Rectangle Edge
 Interpolate/Extrapolate to the ROI edges, regardless of the source data range.
 Data Points
 Interpolate between the specified data points, which are enclosed by the ROI rectangle.
 Interpolate/Extrapolate to Full Axis Edge
 Interpolate/Extrapolate to the full X axis scale range in the input graph, regardless of the source data range.
 Custom
 Interpolate/Extrapolate to a customized data range, specified by the Left and Right value.

Output To

Specify the output result worksheet.

Flyout Menu
Click the triangle button at the top right corner of the ROI tool to open the flyout menu. Menu commands include:
New Output

Output results to the specified worksheet.

New Output for All Curves (N)

Output the results for all curves in the current layer to the specified worksheet (if not empty, append the results).

New Output for All Layers (L)

Output the results for all curves in all layers within the current graph to the specified worksheet (if not empty, append the results).

Go to Report Worksheet

Activate the report worksheet.

Change Data

Select the source data set. This is applicable only when there are multiple curves on the graph.
By default, the Auto mode will be checked in the flyout menu, which means the target data/plot will follow the data plot selection/highlighting outside the ROI box on the graph. For the earlier versions than Origin 2019, Origin doesn't support this auto behavior; to change target plot/data, you can only select desired one from the flyout plot list.
In the flyout menu, it will show first 20 datasets/plots. If there are more than 20 plots in the graph, you can click More... at the bottom of the list to open the Select Plot dialog to select other plots.

Expand to Full Plot(s) Range

Expand the ROI to the full plot(s) range.

Fix ROI Position

Fix the position of the ROI.

Interpolate X/Y

Open the Interpolate Y from X dialog. You can enter multiple X values and the tool will output the interpolated Y values for each of them.

Save Theme

Save the settings as a Theme.

Save as <default>

Save the settings as default Theme.

Load Theme

Load settings from a Theme file.

Preferences

Open the Interpolate Preferences dialog.

