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
 further question to script for legend output
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mjconvey

Germany
Posts

Posted - 03/24/2004 :  05:08:48 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

Mike Buess

USA
3037 Posts

Posted - 03/24/2004 :  07:38:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

sammi.song

China
46 Posts

Posted - 03/25/2004 :  02:01:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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