Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
scs_emi
Posted - 07/15/2015 : 07:39:50 AM Hi there
I have to maintain an old program that uses a LabTalk script to draw some charts. This script does not run correctly. Since I am a total beginner with Origin Labtalk I have the following question: My code opens 2 data-sources and is supposed to draw the data into 1 graph. When I execute my code it opens an empty graph without data. ___________________________________________________________________
%A=C:\A_Grid#2a.dat; %B=C:\A_Grid#2b.dat; xn= 41; ... window -a Data1; for (i=1;i<=xn;i+=1) { worksheet -t $(i*2-1) 4; worksheet -n $(i*2) B$(i); worksheet -n $(i*2-1) A$(i); } window -i; window -a Data2; for (i=1;i<=yn;i+=1) { worksheet -t $(i*2-1) 4; worksheet -n $(i*2) B$(i); worksheet -n $(i*2-1) A$(i); } window -i; window -a Plot; for (i=1;i<=xn;i+=1) { %k=Data1_B$(i); set %k -x Data1_A$(i); // without these lines it works but Why? layer -i %k; }
for (i=1;i<=yn;i+=1) { %k=Data2_B$(i); set %k -x Data2_A$(i); // without these lines it works but Why? layer -i %k; }
Those lines of code are attempting to change the associated X column for each of the Y columns plotted in the graph. But if it works correctly without those 2 lines, then just comment them out.