1.117 FAQ-672 After I plot a spline curve, how can I access the spline data?

Last Update: 12/22/2017

Origin provides several methods for accessing the spline or b-spline data.

Change Line Connection and Create Spline

  1. Change line plot connection to Spline.
  2. Right click the spline line to create spline data.
    Access the spline data.gif


Interpolation Tool

This tool works for XY data in worksheet or graph window.

  1. Support you have plotted a line/scatter/line+symbol plot.
  2. Select Analysis:Mathematics:Interpolate/Extrapolate. Specify the settings in the interplxy dialog box and click OK. You'll now see the spline/b-spline curve added to the graph layer.
  3. By default the spline data is output to original data sheet with long name: interpolated

Interpolation Gadget

This tool only works for 2D graph window.

  1. Support you have plotted a line/scatter/line+symbol plot.
  2. Select Gadgets:Interpolate.
  3. In the dialog, go to Interpolate/Extrapolate Options tab and change Method to Spline options there and click OK. You'll now see the spline/b-spline curve added to region of interest (ROI) the graph layer.
  4. You can resize or move the ROI.
  5. You can click > button and choose New Output to get spline data.

LabTalk Script

  1. First plot your XY data
  2. Create a new sheet in same book with two columns.
  3. By default 1st column should be A(X) and 2nd column should be B(Y). If not, please set them as X and Y.
  4. Suppose the new sheet is Sheet2 and the book is Book1, Fill col(A) with x values at which you want to find the corresponding spline/b-spline y values.
  5. Now activate the graph window, and then go to the Script Window (if you need to open it, select Window:Script Window) and type the following command and press Enter:
    range r1=[book1]sheet2!1;
    range r2=[book1]sheet2!2;
    r2=%c(r1)
    What this command does is to use the col(A) values as X, then use the internal parameters of the spline/b-spline connection, and generate new Y values for each X value using the spline/b-spline parameters, and places them in col(B). See more here

Keywords:Line Connection Method, Interpolate