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
 Multi line legend from column label

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

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