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
 Origin Forum
 include part of worksheet name in legend

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
amkr138 Posted - 11/03/2024 : 09:51:04 AM
I have a group of curves on a graph and I want the legend to display only part of their worksheet name. The name is very long and only let's say the last 10 characters are relevant to the legend. How can it be done? I know how to make the legend display the sheet name but I don't know how I can slice it.

Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2023 (64-bit) 10.0.0.154 (Academic)
Operating System: Windows
3   L A T E S T    R E P L I E S    (Newest First)
ChaoC Posted - 11/07/2024 : 2:01:22 PM
Hello,

You need to change it to 2X and 3X to refer to the 2nd and 3rd plots in the graph.

E.g.

\l(1) %(1X,@LC)
\l(2) %(2X,@LC)
\l(3) %(3X,@LC)

Best,
Chao
amkr138 Posted - 11/07/2024 : 12:12:10 PM
Thank you very much.

Follow up question: If i have multiple worksheets that I import at once with each having its own slicedSheetName, how can i make the legend display that parameter for each work sheet? Currently using the script and the method in the gif above they all display the slicedSheetName from the first worksheet.

ChaoC Posted - 11/04/2024 : 4:00:18 PM
Hello,

You can process/slice the sheet name during import using LabTalk.

See the example below:



string str1$=%(page.info.system.import.filename$);
str1.trimright(".csv");
string str2$=str1.right(10)$;
wks.userparam(++SlicedSheetName);
col(1)[SlicedSheetName]$=str2$;


Best,
Chao

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