T O P I C R E V I E W |
MarioNZ |
Posted - 10/09/2006 : 10:08:05 PM Hi All, I want to get the legend in my graphs to appear in multiple lines rather than in one long line and I also want to use the column label to create the legend automatically.
I tried LabTalk scripts that I found in the archive (http://www.originlab.com/forum/topic.asp?TOPIC_ID=3240):
%A=Line1 Line2 Line3; wks.col2.label$ = %A;
This results in a legend like this: --- Line1 (Line2)
and
%A = Line1\r\nLine2\r\nLine3; wks.col2.label$ = %A;
which leads to a different result: --- Line1rnLine2rnLine3
I also tried to incorporate the -sa switch of the label command like suggested in another post http://www.originlab.com/forum/topic.asp?TOPIC_ID=3191 but I couldn't get this going with the wks.col2.label$ command.
Any ideas how to solve my problem? What am I doing wrong? Thanks a lot Mario
Origin Version: 6.1 Operating System: Win2k |
2 L A T E S T R E P L I E S (Newest First) |
MarioNZ |
Posted - 10/10/2006 : 9:20:17 PM Thanks Mike! Interesting that the line breaks have an effect on the legend when inserted as plain text but not when used together with the %(1) variable... (I was hoping I could still use the "New Legend" button afterwards.)
I might just use your script and insert a \l(0) at the beginning of a new line to get the alignment right and I am done 
Cheers Mario |
Mike Buess |
Posted - 10/10/2006 : 12:53:21 AM Hi Mario,
This will maintain your multiline label in the legend but probably won't justify like you want...
%A=wks.col2.label$; // get column label legend; // create legend legend.text$=\l(1) %A; // set legend text
It will produce a legend like this...
--- Line 1 Line 2
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 10/10/2006 12:54:27 AM
Edited by - Mike Buess on 10/10/2006 09:29:38 AM |