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
 Origin Forum
 How to correctly link axes?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

lijbereket

12 Posts

Posted - 01/28/2021 :  2:38:09 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows 10 Pro

I added a second layer for a Top-X axis. I am trying to link this axis to the bottom axis using a user defined function. It appears that Origin is not doing the linking correctly; the tick label values on the top axis are incorrect for the given values of the bottom axis (see figure below). I am entering the linking equation (circled in red) as

X1 = 23.429+80.890*(Cos(x1*3.14159/180))^0.323 ....(same thing for X2)

Am I doing something wrong?


Edited by - lijbereket on 01/28/2021 2:43:24 PM

YimingChen

1618 Posts

Posted - 01/28/2021 :  4:37:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Since your second x axis tick position is a nonlinear transformation, so other than the settings you already made, you need to set formula for axis tick positions. See below:
Direct Formula: -acos(((x-23.429)/80.890)^(1/0.323))*180/pi
Inverse Formula: 23.429+80.890*cos(-x/180*pi)^0.323


James

Edited by - YimingChen on 01/28/2021 4:37:55 PM
Go to Top of Page

YimingChen

1618 Posts

Posted - 01/28/2021 :  4:41:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you would like to have ticks of upper x axis to be aligned with bottom axis, you just need one layer, but set upper x axis tick label with formula:
23.429+80.890*cos(-x/180*pi)^0.323



James
Go to Top of Page

lijbereket

12 Posts

Posted - 02/02/2021 :  11:34:44 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Thank you, James, for your reply. I tried both methods: adding the top x-axis in the same layer and in a separate layer. Doing it in the same layer was more convenient. Adding a second layer gives the flexibility of having separate tick positions but I couldn't figure out how not to make the tick labels cluttered (or even choose their positions).
Go to Top of Page

YimingChen

1618 Posts

Posted - 02/03/2021 :  10:41:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The advantage of the double-layer method is that you can customize the upper tick positions. While for the one layer method, the tick position has to be the same for two x axis. See below:



James
Go to Top of Page

lijbereket

12 Posts

Posted - 02/04/2021 :  6:04:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Got it! Thanks for the info @YimingChen.

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