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
 Trouble with GETPTS
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

m.hessler

Germany
Posts

Posted - 04/04/2007 :  09:13:11 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version: 7.5G SR6
Operating System: XP

I would like to get a number of x/y data pairs by selecting them in a graph by help of a script.
The problem is that the numbers I recieve have not much in common with the points I selected.
When using the datareader I finally found out that the displayed graph and the trace on which the datareader moves are different!!

How could this be?

Markus

m.hessler

Germany
Posts

Posted - 04/04/2007 :  09:37:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
One part of the solution I found by myself:
in my script:

getnumber (Sourcedata) %%q (sourcecolumn) %%l (number of peaks) peaks;
win -n plot temp;
layer -i %q_%l;
layer -a;
getpts peaks;

the layer -a command has not finished when Origin executes the getpts command. So getpts expects dueto some reason that the graph is still at the "not rescaled" position. By adding "sec -p 1" after "layer -a" this problem is solved.

BUT: As soon as I try do expand or resize the graph window I have the same problem!
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 04/04/2007 :  10:46:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I can see why a pause is necessary between 'layer -a' and the getpts command but I don't understand the rest. Are you saying that getpts fails after you manually resize the graph? I can't reproduce that.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 04/04/2007 11:06:08 AM
Go to Top of Page

m.hessler

Germany
Posts

Posted - 04/05/2007 :  05:02:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
My observation is that getpts fails when I enlarge/resize the graph before placing the datareader for the first time.
Once I choose one datapoint in the graph I can resize the graph without problems and all the datapoints are consistent with the values I expect.
I guess I just have to start with a graph window of sufficient size so that enlarging the graph before taking the first point is not necessary.
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