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 to express in custom field of legendupdate?

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
hkkim Posted - 12/27/2012 : 01:14:47 AM
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.1 SR3
Operating System: Windows XP

Hello!
I want to display a graph symbol, an absolute path and a comments field as a graph legend. Here is my command. But the only longname was displayed as a result. How can I fix it?
Thanks in advance!

legendupdate update:=0 legend:=0 mode:=7 custom:="\l(1) %(1, @R) %(1X, @LC)";

hkkim
4   L A T E S T    R E P L I E S    (Newest First)
hkkim Posted - 01/06/2013 : 8:39:34 PM
Dear Kathy,

Thank you for your comment.
I'm still not familiar with OOP.
My code runs well now. Thanks again!

hkkim
Kathy_Wang Posted - 01/06/2013 : 01:02:21 AM
Hi,

So far as I can see from the parts of your script, in every loop the previously generated label will be replaced by the new label, as you used "label -n" option which replaces the specified label.

So in case you want to show 4 labels, you need to create 4 labels, for example when you define GObject cmt2, instead of attach it to "Label" which is the same label cmt1 attached to, attach it to a new label object "Label1" by:


GObject cmt2 = Label1;


Kathy
Originlab
hkkim Posted - 01/04/2013 : 01:31:14 AM
Dear Jacqueline,

I want to display comment fields up to 4 on a graph. The GObject was used to reduce a font size. Below is a part of my code. But the only last label is showed. How could I fix this problem? Thanks in advance!!

-------------------------------------------------------------------------------------------------
int commentY=800; // commentY has the 1st comment Y pixel location on a graph
...
loop (i1, 2, graphno) // loop column from 2nd to end
{
...
plotxy [%(rPage.name$)]1!(1,$(i1)) plot:=202 ogl:=[<new template:=%(tmpPathName$)>];
// draw new graph with 1st worksheet
GObject cmt1=label;
label -s -d 3800 commentY -n cmt1 "%(@LC)";
// 1st column comment display on a graph
cmt1.fsize=16;
...
loop (i2, 2, compno) // loop worksheet from 2nd to end
{
plotxy [%(rPage.name$)]($(i2))!(1,$(i1)) plot:=202 ogl:=1;
// add a graph line using from 2nd to end layers
commentY=commentY+i2*100;
// commentY has the 2nd~4th Y pixel location on a graph
GObject cmt2=label;
label -s -d 3800 commentY -n cmt2 "%(i2, @LC)";
cmt2.fsize=16;
...
}
...
}
JacquelineHe Posted - 12/28/2012 : 01:30:02 AM
Hi,

Our last version Origin 90 supports your labtalk script, but Origin 8.1 does not.

You can try to use this script to instead it:
label -sl -n legend "\l(1) %(1, @R) %(1X, @LC)";

If you want to know more info about that, please refer to these pages:
http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/LabTalk/Script/Creating_and_Accessing_Graphical_Objects.html#Creating_Legends

http://www.originlab.com/www/helponline/Origin/en/Programming/mergedProjects/LabTalk/LabTalk/Label_(command).html

Thanks

OriginLab
Jacqueline

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