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
 Origin Forum
 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

kalkie

Netherlands
3 Posts

Posted - 11/30/2001 :  04:02:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I want to have both the column label and the worksheet name in the legend at the startup. How do I have to change the
\L(%d) %%(%d,@w)\n\r
command in the Origin.ini file?
\L(%d) %%(d) %%(%d,@w)\n\r
doesn't work!

Kind regards,
Jeroen Kalkman

rtoomey

USA
184 Posts

Posted - 12/04/2001 :  12:16:31 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The example you provide here has a couple errors.

1. The section %%(d) is missing a % sign inside the parentheses.
2. The part that reads \n\r should be \r\n.
3. The notation works with two arguments only. That is to say, if you attempt to use %d a third time, the result for that third part will be garbage.

This third problem makes it particularly difficult to use this section of the INI file for your purposes. A suggestion has already been entered into our database to allow the use of %d more than two times in the INI file. Refer to tracking number #1985 if you have any questions/comments.

In the meantime, here is a script that should do what you want. Here, count is being used as a substitute for %d.

%Z="";
count=1;
doc -e DY {
%Z=%Z
\L($(count)) %%($(count)) %%($(count),@W);
count++;
}
n1=legend.x;
if(n1==0/0) {
label -s -sa -n legend %Z; // Use legendx to protect it from being destroyed
} else {
legend.text$=%Z;
}


The script could be placed in a file and then executed by clicking a toolbar button. Or, you might try incorporating the script into a file such as Plot.OGS so that it happens automatically for the specified plot type. Simply place the script at the end (but before the return statement) of its associated section (e.g. [Pie]) in Plot.OGS.

- rtoomey

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