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
 further question to script for legend output

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
mjconvey Posted - 03/24/2004 : 05:08:48 AM
I've also been having trouble finding the script to produce my desired legend.

I have defined a loop which calls data into a worksheet then plots it onto one graph. With every run of the loop and graphing of the data, I'd like to add a line to the legend text box "key".

I can easily produce the legend for the first data set with:

label -s -sa -n Key \l(($(i)) d=%J \r\n;

where "i" is the loop counting variable and corresponds to the number of the data set and %J a parameter for each data set which the user imputs in a promt at the beginning of each run of the loop.

The problem is I can't make a second line in the same textbox on the second run of the loop because by using the "label" command again I simply copy over, and not add too, what already is in the text box.

I've tried using the "Key.addText(\l(($(i)) d=%J )" command after the initial label command but I can't use "\r\n" with the "addText" command.

Is there a way to incorporate "\r\n" in the "Key.addText(StringVariable) command?

I'd appreciate any suggestions.

Martin J.
2   L A T E S T    R E P L I E S    (Newest First)
sammi.song Posted - 03/25/2004 : 02:01:46 AM
Hi Martin,

label -s -sa -n Key "Test"; //Create the label, Key
%A="
Append a line";
Key.addtext(A); //Append text to Key label

Thanks,
Sammi
Mike Buess Posted - 03/24/2004 : 07:38:15 AM
Hi Martin,

%A="new line";
%Z=legend.text$; // existing text
%Z=%Z
%A; // notice literal line return
legend.text$=%Z;
// or
label -s -n legend %Z;

Mike Buess
Origin WebRing Member

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