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
 Link Custom Layer

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
annekin Posted - 03/21/2006 : 03:22:47 AM
Origin Version (Select Help-->About Origin): 7G / 7.5Pro
Operating System: WinXP

Hi,

I have a problem with linking layers. Lets say I have three layers. In all of these layers I want to display the same curve, but in the first layer the y-axis is scaled to the maximum of the curve and the second and third layer should show different magnifications. When clicking the curve by hand together, I just set up a custom link for these layers where I set Y1 to Y1 of layer1 and divide Y2 by the desired magnification. The x-axis is of course linked one-to-one to layer1.
But there is a problem implementing this procedure in my labtalk script, since I know you cannot set a custom link using labtalk. Another way would be to just seperately set the y-axis of the second and third layer. But then rescaling layer1 will not rescale the other layers.
The third alternative I tried was setting the custom link by hand, where the Y2 is divided by a variable, which is then set to the desired magnification. But this only works when the graph page is first called. Changing the value of the variable will not result in changing the scaling behaviour.

Is there a workaround to this kind of thing or am I at a dead end here?

Best regards,
Anita
2   L A T E S T    R E P L I E S    (Newest First)
Laurie Posted - 03/21/2006 : 10:25:34 AM
Hi Anita,

If you use the third alternative, setting the custom link by hand and using a variable, you can then later on separately set the y axis scale of the second and third layer, if the variable changes.

For example, if you set the Y Axis Link for layer 2 to Custom as follows: Y1=Y1/VAR and Y2=Y2/VAR. If the value of VAR changes, you'll need to also have your script set Y1 and Y2 as follows: y1=layer1.y.from/var; and y2=layer1.y.to/var;, but if you change the values of layer 1, then layer 2 will update automatically.

Laurie

OriginLab Technical Support
Mike Buess Posted - 03/21/2006 : 10:12:55 AM
Hi Anita,

Create a text label in layer 1, open its Label Control and set Script, Run After: Axes Rescale. Then add the scripts needed to rescale layers 2 and 3. You might want to hide the text label for appearance sake. (Select Edit > Button Edit Mode to edit the label later.) You can create similar text labels in layers 2 and 3 in case you want to rescale from those layers.

Scripts for the layer 1 label might look like this...

// x1, y1, etc refer to layer 1 scales
layer2.x.from = x1; // same x1
layer2.x.to = x2; // same x2
layer2.y.from = y1; // same y1
layer2.y.to = y2/L2Magnify; // divide y2 by magnification variable

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 03/21/2006 10:37:47 AM

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