OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
 
Skip Navigation Links
All BooksExpand All Books
Quick HelpExpand Quick Help
GraphingExpand Graphing

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

Last Update: 8/3/2015

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

Method 1
  1. First plot your data as Line, Line + Symbol, or Spline Connected (from Plot: Line: Spline Connected).
  2. If you plotted as Line or as Line + Symbol, then double-click on the data plot to open the Plot Details dialog box. Select the Line tab and then set the desired Connect setting, such as Spline. Click OK to close the dialog box.
  3. 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.
  4. To view the spline/b-spline data in a worksheet, double-click on the spline/b-spline curve in your graph. This will open the Plot Details dialog box.
  5. On the left side of the Plot Details dialog box, make sure the interpolated data is selected in the tree.Now click the Worksheet button at the bottom of the right panel. This opens the worksheet for your spline/b-spline data.
Method 2
  1. First plot your data as described in steps 1 and 2 of Method 1 above.
  2. Add two more columns to your original data worksheet, or create a new worksheet that displays two columns.
  3. Set the 1st added column as type X and the second as type Y.
  4. For the next steps, we'll assume you created a new worksheet, Sheet2 in Book1 and the columns are col(A) and col(B). 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

 

© OriginLab Corporation. All rights reserved.