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 layer axes by 'custom' formula

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
mjan Posted - 10/20/2015 : 03:16:26 AM
Hello,

I have a problem that I've been trying to solve for a while. I have a line-plot with wavelength on the bottom x-axis. I want to create a second layer in which I will have corresponding energy on top. I know how to do this manually from the 'plot-details' menu (see screenshot), but how to do this in code? I tried as described below, but when I zoom in one layer, the other does not rescale.


double start_eV = X1;
double stop_eV = X2;

double start_nm = 1240/start_eV;
double stop_nm = 1240/stop_eV;

layer -n X;

X1 = start_nm;
X2 = stop_nm;


This is what I want to achieve:


Origin Ver. 8.5.0
Operating System: Win 7
1   L A T E S T    R E P L I E S    (Newest First)
SeanMao Posted - 10/20/2015 : 03:52:30 AM
Hi,

The LabTalk script for setting custom formula for linking axis is only available since Origin 2015 SR0 by command:


layer.axis.link.from$;

layer.axis.link.to$;


There is no way to set it using LabTalk script in Origin 8.5, you can find its reference in this page:
http://www.originlab.com/doc/LabTalk/ref/Layer-Axis-obj

Regards!

Sean

OriginLab Tech. Service

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