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
 Label postion bug?

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
zimplant Posted - 11/03/2011 : 09:10:03 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1 SR2
Operating System: Win 7 64bit

Hi,
I figured some problem adjusting the position of a label to my graph. I made a little script to do some evaluation of the plot and then post it as a label to the graph (see code attached). I added a new button and interestingly I get two different positions when I execute the script ones and after it a second time. My label position is calculated from the system coordinates X1, X2, Y1 and Y2. I’m drawing two lines too, but without any problems. I added two figures to show my observation. In the pictures you can see that the coordinates are the same (marked with circles) for the two executions, but the calculated position differs from each other. What I am doing wrong here? Any comments or help will be appreciated.
Wilhelm


draw -n DVL -l  {(X1+(X2-X1)*0.8),(Y1-(Y2-Y1)*0.46),(X1+(X2-X1)*0.8),(Y1-(Y2-Y1)*0.7)};
draw -n DVL2 -l  {(X1+(X2-X1)*0.2),(Y1-(Y2-Y1)*0.46),(X1+(X2-X1)*0.2),(Y1-(Y2-Y1)*0.7)};
MyVar2 =%J-%L;
label -j 0 -s -sa -n MyL1

TM\t30°C\t5°C\tDelta T [mV]
%(TM2$)\t%J\t%L\t$(MyVar2)
\t%K\t%M;
X1=;
X2=;
Y1=;
Y2=;
MyL1.x = X1 + (X2 - X1) *0.51;
MyL1.y = Y1 - (Y2 - Y1) *0.55;
MyL1.fsize=16;
MyL1.x=;
MyL1.y=;
2   L A T E S T    R E P L I E S    (Newest First)
zimplant Posted - 12/13/2011 : 09:25:50 AM
Thanks a lot for the help.
Didn't think of that.

Wilhelm
Sam Fang Posted - 11/07/2011 : 04:56:47 AM
The difference may be caused by the script:
------------------------
MyL1.fsize=16;

------------------------

When the text's font size is changed, size of the text's rectangle may be adjusted to fit the text. So the first execution's MyL1.x or MyL1.y will be adjusted if the default font size is not 16. And the font size is 16 before the second execution, its value will be not adjusted in the second execution.

Sam
OriginLab Technical Services

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