Author |
Topic  |
|
flirt
USA
Posts |
Posted - 02/11/2005 : 3:11:02 PM
|
Is there a simple tool to show the equation of drawn line? Sometimes we need know the slope of the linear part or get the tangential. It seems drawing is more acurate than fitting, although I don't know how to show the equation impromptly. Thanks:) |
|
easwar
USA
1965 Posts |
Posted - 02/11/2005 : 3:40:26 PM
|
Hi,
All drawn objects such as lines, polylines, rectangles etc have names and associated properties. Click on the object, then right-click for context menu, and select Label Control to bring up dialog and see what the name is. Double-click on the object to bring up the Properties dialog (or select Properties from rt-click context menu).
For example, the first line drawn on the graph has default name of line. This object then has properties of line.x1, line.x2, line.y1, line.y2 for the x,y coordinates of the end points, which can then be used to compute slope etc.
You can also go to script window and type line.= to see the properties.
As for your statement "It seems drawing is more acurate than fitting" can you elaborate what you mean by that?
Easwar OriginLab
Edited by - easwar on 02/11/2005 3:41:43 PM |
 |
|
flirt
USA
Posts |
Posted - 02/11/2005 : 3:57:23 PM
|
Thanks for replying. yes i checked the property and found the start/end point, but that's a little complicated. I have a lot of data, so i want to replace the data one by one and get the slope/interseption automatically, if the equation can be shown on the graph and can change simultaneously. The reason for this is, the curve is not linear for the whole range, of course good fitting can be obtained by setting data range, but that's tiresome when there's a lot of data. |
 |
|
easwar
USA
1965 Posts |
Posted - 02/11/2005 : 4:02:59 PM
|
Hi,
Any such property can be programmatically accessed and so one could write a custom routine to compute the slope, intercept etc based on these property values and generate/udpate a graph label automatically.
If you can provide some more detail here on what your data looks like, which part of the data you want to compute your slope on, how would you change your data (by importing, for example), someone could post some lines of code that you could then use.
You could also contact tech support with the details so someone can help you with this.
Easwar OriginLab
|
 |
|
|
Topic  |
|
|
|