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!!
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!
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.
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.