
Contents |
Subtract Straight Line
Subtract the active plot from a straight line formed with two points picked on the graph page
subtract_line x1:=0 y1:=0.5 x2:=200 y2:=3.5;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input | iy |
Input XYRange | |
Specifies the input data that will be subtracted. |
| X1 | x1 |
Input double | |
Specifies the X value of the first point. |
| Y1 | y1 |
Input double | |
Specifies the Y value of the first point. |
| X2 | x2 |
Input double | |
Specifies the X value of the second point. |
| Y2 | y2 |
Input double | |
Specifies the Y value of the second point. |
| Output | oy |
Output XYRange | |
Specifies the output range for the subtracted data. See the syntax here. |
This X-Function can be used to subtract a straight line from a data set. The straight line is determined by two points. If you use this X-Function from the menu and a graph is active, you can click on the graph to select these two points. If you use this X-Function from script, you can specify the X and Y values of these two points.
In this example, we use the subtract_line X-Function to subtract a straight line from the data plot.