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
 Lengend

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
66de250 Posted - 07/18/2025 : 02:08:54 AM
Origin Ver 2021. and Service Release (Select Help-->About Origin):
Operating System: win11
I have 11 columns of data. The first column is x. Plot all the data onto one layer. How should I set the legend to display only the long names of the second and last columns through the LabTalk language or the X-Function command line only? That is, the legend only has the second column and the last column
3   L A T E S T    R E P L I E S    (Newest First)
ChaoC Posted - 07/21/2025 : 10:41:44 AM
Hello,

You can use layer- c to count the number of plots in the layer:
https://www.originlab.com/doc/en/LabTalk/ref/Layer_Options_for_Plot#-c

E.g.

layer -c;
label -n Legend \l(1) %(1,@LL)%(CRLF)\l(%(count)) %(count,@LL);

Best,
Chao
66de250 Posted - 07/19/2025 : 08:20:05 AM
quote:
Originally posted by ChaoC

Hello,

You can use the label command to replace the legend syntax.
E.g. label -n Legend \l(1) %(1,@LL)%(CRLF)\l(10) %(10,@LL);

See:


Thank you very much for your help! How can the second legend be determined based on the number of columns in the worksheet? That is to say, the number of my data columns is no longer a definite number, but I still need to use scripts to create a legend with only the first and last columns

ChaoC Posted - 07/18/2025 : 09:25:35 AM
Hello,

You can use the label command to replace the legend syntax.
E.g. label -n Legend \l(1) %(1,@LL)%(CRLF)\l(10) %(10,@LL);

See:


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