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
 All Forums
 Origin Forum
 Origin Forum
 Measuring distances on a line graph

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
abasu Posted - 03/22/2002 : 10:47:53 AM
Has anyone figured out an easy way to measure
Dx and Dy between two points on a line graph
window?
2   L A T E S T    R E P L I E S    (Newest First)
H.Steen Posted - 03/24/2002 : 11:19:03 AM
You can also use the data selector tool to set both left and right point on your graph before you read out the difference.

Place a text label on your graph, Press the (Alt) key while you double click on the label, Change "script run after" to Button up and paste the following code into the script part of the window,

ii=0;
dotool 4;
define PointProc
{ // Insert all commands to perform after dotool here
ii++;
ii1=MKS1;
ii2=MKS2;
Type Marker position:;
ii1=;
ii2=;
Type DeltaX: ;
Data1_A[ii2]-Data1_A[ii1]=;
Type DeltaY: ;
Data1_B[ii2]-Data1_B[ii1]=;
DeltaX=Data1_A[ii2]-Data1_A[ii1];
DeltaY=Data1_B[ii2]-Data1_B[ii1];
if (ii>0)
dotool 0;
}

The PointProc is a little more difficult than ordinary Labtalk code. To get it working the first time I searched the forum for 'PointProc'.

After you press the button you can move the markers with the mouse or the keyboard and when you doubleclick the data are shown in the script window. You can add more code to perform some more calculation using the values of DeltaX and DeltaY.

Helge



Edited by - H.Steen on 03/24/2002 11:22:44
Laurie Posted - 03/22/2002 : 12:30:23 PM
You can use the data reader tool to read the (X,Y) coordinate values. Open the Script Window (Window:Script Window) and type the following:
x=
and press Return. The x value will be typed out to the Script Window. Repeat for y (y=).

Move the cursor to a new X,Y value and again return the values to the Script Window.

You can then use the Script Window for simple math.

You could automate this much further...

OriginLab Technical Support

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000