The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 show equation of line drawn by line tool
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

flirt

USA
Posts

Posted - 02/11/2005 :  3:11:02 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

flirt

USA
Posts

Posted - 02/11/2005 :  3:57:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.
Go to Top of Page

easwar

USA
1965 Posts

Posted - 02/11/2005 :  4:02:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000