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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Matching of first and last point

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cougar2 Posted - 06/08/2004 : 05:12:59 AM
Hi everyone,

my script plots 45 graphs into 45 layers of one plot. To do this, I calculate the start and stop value for the first graph, then translate all worksheets so that the plots have the same starting point. Next, I plot every single graph and then merge them into one. Last, I rescale every layer, so that there is 10 % space to the axes, vertically.
Now, sometimes the plot heights change (due to my measurement). How can I do the rescaling so that for each graph, the first and last point exactly match in the merged plot?



first=0;last1=0;last=0;
doc -e W {
%A = %H;
if(exist(%A_C)==1) {
first=%A!cell(1,3); // calculate first and last value
last=%A!cell($(wks.maxRows),3)
};
break;
};

doc -e W {kk=$(first)-%H_C[1];%H_C=%H_C+$(kk)}; // translate y-values

doc -e W { // plot every single graph
%C = %H;
worksheet -s 3 0;
worksheet -p 200 kaptemplate3;
};

label -s -d 500 300 -n filename %C;
%t=%C;
win -m; // merge all graphs
diff=($(last)-$(first))/10; // 10 % of Trace difference
doc -e L { // scale all Layers
layer.Y.from=$(first)-$(diff);
layer.Y.to=$(last)+$(diff);
};
layer1.Y.ticks=1;
layer1.Y2.ticks=1;


Regards,
Cougar


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000