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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 new line in legend
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

frank.hisker

Germany
Posts

Posted - 05/20/2010 :  02:47:17 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 7.5
Operating System: XP
Hello, I am trying to write the legend automatically. This script works very good except of the fact that it writes all information in only one line (this line is one variable)
Can anybody help me to add a new line command, if %L becomes %L+%K?
Frank
________________________________________________

window -a auswertung;
jj=wks.maxrows;
window -a Arbeit_TKS;
loop(num, 1, jj){
%V = %(auswertung,1,num); // Need to quote the string because there is space between \L($(jj)) and %J;
%K =\L($(num)) %V;
if(num==1){
%E=%K;
%L=%K;
};
else {
%E=%E%K;
%L=%L%K;
};
};
//Create a legend for all plots
win -i;
window -a Arbeit_TKS;
win -z;
layer -s 1; //setzt Layer Nr.1 als akti
zbeg=0; //Vorgabe des Beginnzeitpunktes
zend=0; //Vorgabe des Endzeitpunktes
t=1; //Setzen der ORIGIN-Variablen t auf "1"
for ( ;t > 0; ) {
layer -s 1; //setzt Layer Nr.1 als aktiv
axis x; //Aenderungsmoeglichkeit der Achsenskalierung
axis y; //Aenderungsmoeglichkeit der Achsenskalierung
// layer -s 2; //setzt Layer Nr.2 als aktiv
// axis y; //Aenderungsmoeglichkeit der Achsenskalierung
type -y Skalierung veraendern?; //Ja --> t wird "1", Schleife laeuft weiter, Nein --> t wird "0", Schleife endet
};
legend -s;
legend.x=30;
legend.y=100;
legend.text$ = %L;
legend.background = 1;
win -z;

frank.hisker

Germany
Posts

Posted - 05/21/2010 :  02:55:52 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Solution.
It was a simple new line in the program code.
%L=%L
%K;

not %L=%L%K;
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000