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
 new line in legend

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
frank.hisker Posted - 05/20/2010 : 02:47:17 AM
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;
1   L A T E S T    R E P L I E S    (Newest First)
frank.hisker Posted - 05/21/2010 : 02:55:52 AM
Solution.
It was a simple new line in the program code.
%L=%L
%K;

not %L=%L%K;

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