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
 Forum for Python
 How to change custom formula in linked axis scale?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ChemistryGuy

Australia
49 Posts

Posted - 11/03/2022 :  6:02:36 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: OriginPro 2022b
Operating System: Windows 11

I have a graph similar to that shown in Figure 4 on the following page: http://blog.originlab.com/how-to-make-a-neat-double-x-graph

Is it possible to use Python to change the formula used to link the top X axis to the bottom X axis? For example, rather than using the formula "X1 = 9/5X1+32" instead changing this to "X1 = 2*X1".

I appreciate anyone's help and thank you in advance.

ChemistryGuy

Australia
49 Posts

Posted - 11/03/2022 :  7:19:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Actually, I managed to work this out myself.
In case it helps anyone else, the code is:
gl.lt_exec(f'layer.x.link.from$ = "2*X1"')
gl.lt_exec(f'layer.x.link.to$ = "2*X2"')

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