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
 how can I remove some entries of 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
akuhr Posted - 02/17/2019 : 2:57:45 PM
Origin Ver. 2019 at Windows 7

Hello!

With LabTalk I plot 10 lines to a Layer. But
in the legend I only want to appear line 1-5 and
not line 6-10.
Can I realized this with LabTalk?

Regards, Astrid
4   L A T E S T    R E P L I E S    (Newest First)
akuhr Posted - 02/19/2019 : 06:19:27 AM
Hello Yuki,

thanx.
It works very well.

Regards, Astrid
yuki_wu Posted - 02/18/2019 : 9:30:36 PM
Hi Astrid,

%(CR) means newline in LabTalk. So you could use:

string str$ = \l(1) %(1Y, @L)%(CR)\l(2) %(2Y, @L);
legend.text$ = str$;


Regards,
Yuki
OriginLab
akuhr Posted - 02/18/2019 : 12:14:56 PM
Hello Yuki,

thanx for information.
I have a loop over the
first half of data for
plotting it, and this
I want to go to legend.

Then I have a loop over
the second half of data, which
should be not appear in legend.

string mystring$ = \l(1) %(1);
for (ii = 2; ii <= ianz/2; ii++) {
        window -a %(Book$);
        page.active = $(ii);	
        wks.colSel(3,3);
        window -a %(Graph$);
        worksheet -P 245 MyTernaryLine;
        icolo = $(ii) + 1;
        layer.plot = $(ii);
        set %C -c $(icolo);
        #type "sheet $(ii) color $(icolo)";
        mystring$ = mystring$ + "\l($(ii)) %($(ii))";
}
# second loop, whithout concating mystring$
legend.text$ = mystring$;
type "%(legend.text$)";

But it is doing all in one line.

\l(1) tab1\l(2) tab2\l(3) tab3\l(4) tab4

How can I get one at under of the other?

(I am a beginner user of Labtalk.)

Regards, Astrid
yuki_wu Posted - 02/17/2019 : 10:44:28 PM
Hi Astrid,

You could specify the lagend text via:
legend.text$ =

For example:
string str$ = \l(1) %(1Y, @L) \l(2) %(2Y, @L);
legend.text$ = str$;


More info about legend substitution notation:
https://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation

Regards,
Yuki
OriginLab

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