Hi Kaya Layek,
There is no built-in tool to move graphically selected data points directly by same displacement. As Shirley
suggested, you can share your need in your application with people so that people can get the sense
of the purpose.
The following script code is crude and cumbersome, but does a kind of job. (It would probably require a
newer version than your Origin8.)
///////////////////////////////////////////////////
%B="Vertically(Y) Horizontally(X) Both(X&Y)";
mvdir=1;
getn (Direction to Move?) mvdir:B; //dir: Y, X, X&Y
kk=0;
type -b Double-click or press ENTER to select the point;
getPts 100 (press ENTER);
def PointProc {
kk++;
%(getpts.xdata$)[kk]=X;
%(getpts.indexData$)[kk]=index;
type -b Go Next(Double-click or ENTER), or End(select Pointer);
}
def QuitToolbox {
np=getpts.count;
type -b Click destination of 1st point(within 7 seconds);
dotool 2; //Screen Reader
type -b Wait a few seconds;
sec -p 7; //Pause some seconds
dotool 0; //Pointer tool
type -b Now we update the points.;
for(jj=1; jj<=np; jj++) {
ptix=%(getpts.indexData$)[jj];
ptx=%(getpts.xdata$)[jj];
pty=%(getpts.data$)[_indx[jj]];
}
bk$=token(%C,1,"_")$;
range -wx rWx = %C;
uu = range2uid(rWx);
xds$=uid2Name(uu)$; //returns e.g. A for plot(A,B)
range rx=[%(bk$)]!col(%(xds$));
ddx=rx[1]-X;
ddy=%(getpts.data$)[1]-Y;
for(jj=1; jj<=np; jj++) {
pix=_indx[jj];
if(mvdir==1 || mvdir==3) {
%(getpts.data$)[pix]=%(getpts.data$)[pix]-ddy;
}
if(mvdir==2 || mvdir==3) {
rx[pix]=rx[pix]-ddx;
}
}
}
///////////////////////////////////////////////////
Hope this helps.
--Hideo Fujii
OriginLab