How to Add a Second Axis in Origin

By | February 19, 2015

I recently had a bit of trouble figuring out how to add a second axis in Origin.

To save myself time in the future, here are the resources I found that helped me.

Add a linear second axis

Adding a linear second axis turned out to be rather easy. This video from Originlab themselves talks you through adding a second axis, activating the tick labels, and setting the appropriate scaling factor.

 

Add a non-linear second axis

Adding a non-linear second axis is a bit more involved. We need to use the script window and the normal origin graph menus.

For a full run through of what you need to do to set a non-linear second axis in origin, check out this page, also from Originlab.

The key steps are:

1. Activate second axis and tick labels

For this you just need to more or less follow the video guide above. You don’t need to set a linear scaling factor though, as that will be taken care of in step 2.

2. Set the second x axis scaling with the script window

The second stage is to set the scaling of this second x axis with the script window. Origin scripting is something I’ve never really been able to get my head around, but thankfully the above guide is pretty helpful.

The basic idea is this:

  1. Open the script window (Window->Script Window)
  2. Click on the graph you want to modify
  3. Type in the correct origin script

For example to have a 1/x relationship on the second x axis, you would type:

layer.x2.label.formula$ = "1/x"

and hit return.

If all went well you should have added your correctly scaled second x axis.