T O P I C R E V I E W |
m.hessler |
Posted - 04/04/2007 : 09:13:11 AM 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 |
3 L A T E S T R E P L I E S (Newest First) |
m.hessler |
Posted - 04/05/2007 : 05:02:38 AM 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. |
Mike Buess |
Posted - 04/04/2007 : 10:46:21 AM 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 |
m.hessler |
Posted - 04/04/2007 : 09:37:54 AM 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!
|