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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Link layer axes by 'custom' formula
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mjan

Sweden
1 Posts

Posted - 10/20/2015 :  03:16:26 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Edited by - mjan on 10/20/2015 03:17:14 AM

SeanMao

China
288 Posts

Posted - 10/20/2015 :  03:52:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000