Hi adeodatoarthur,
If you meant to calculate the tangent of two points on a line directly in the graph (without going back to worksheet for calculation),
you can try the following script (modified from the 3rd sample in:
https://www.originlab.com/doc/LabTalk/ref/dotoolbox-cmd#Examples: ):
//////////////////////////////////////////////////////
type -b Pick the 1st Point by Double-Clicking or Pressing ENTER, then do the same for 2nd Point;
dotool 3; //Data Selector
count = 1;
def pointproc {
DS$(count)$=%C; //Dataset Name
IDX$(count)=index; //Row#
PX$(count) = X; //X coordinate
PY$(count) = Y; //Y coordinate
count++;
if(count == 3) {
type -a Line: %(DS1$)[$(IDX1)]:($(PX1,.2),$(PY1,.2)) - %(DS2$)[$(IDX2)]:($(PX2,.2),$(PY2,.2));
type -a Slope: $((PY2-PY1)/(PX2-PX1),.3);
dotool 0; //Reset to Arrow tool
}
}
//////////////////////////////////////////////////////
I hope that I didn't misunderstand what you wanted.
--Hideo Fujii
OriginLab