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
 More on custom legends
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tkcroat

USA
17 Posts

Posted - 09/22/2008 :  1:53:04 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Im trying to make a custom legend that contains both the worksheet name (@WS) and the column long name (@LL). This does work if I manually edit the Legend Text Control box, but then Id have to do this separately for every data column plotted in a graph window.

Previous posts show that custom legends can be defined either using 1) Graph Properties/Legend/ auto legend/custom for an individual graph or 2) globally by altering the legend field in origin.ini.
http://wiki.originlab.com/index.php?title=LabTalk:Substitutions_Notations#.25.28_.29_Substitution
http://wiki.originlab.com/~originla/howto/index.php?title=QuickHelp:How_do_I_customize_the_default_axis_titles_and_legend

However Ive experimented with both methods and still havent been able to get both the worksheet name and the column long name into the legend automatically for each plot. It seems like it only picks up the token listed first (WS or LL but not both). Is this possible to do and if so can someone post the exact syntax of how this would be entered?

Echo_Chu

China
Posts

Posted - 09/24/2008 :  05:24:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

I am sorry that Origin ini can only support two %d in legend text. I have submitted a tracker #12269 and we will fix it

Before we get it fixed, you can use following labtalk script to update the legend

layer -c;
string str;
str$="";
loop (ii, 1, count)  {str$=str$+"\l($(ii)) %%($(ii), @WS)_%%($(ii), @LS)%(crlf)";};
legend.text$=str$;
Go to Top of Page

tkcroat

USA
17 Posts

Posted - 09/25/2008 :  11:12:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
For complicated plots with lots of separate datasets it's essential to have both quantities in the legend (e.g. column name and worksheet name). Given this problem the work-around that I'm currently using is to use the code @LN (designed to display comments field and units field together). Then I have a little script that copies the worksheet name into the units field everywhere (which I don't necessarily need for units). Still it would be better to have a built-in two letter code to allow combination of column name and worksheet name in legend since these are the two fundamental things that identify data.
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