Simple means of mirror linear axis with log axis

Hi all,

I am trying to plot some data where the x-axis is ln(T) and I want to also show T on the mirrored X-axis. I was trying to use TransformAxis function but there are only a handful of options and none work for me.

I must plot ln(T) on a linear scale, instead of display T on a log-scale. See the attached image for exactly what I want to accomplish.

Thanks!

I've done this in the past by plotting the same data twice on two axes, then replacing the upper ticks by "User Ticks From Waves" which I created manually to highlight some points (Auto/Man Ticks tab of Modify Axis popup window):

display
AppendToGraph Ywav vs Xwav
AppendToGraph /T Ywav vs Xwav
ModifyGraph userticks(top)={locationsOfTicks, ValuesToDisplay}
Here is an example:

Function doStuff()
    // make some data
    Make/O/D/N=200 myData, myData_X, myData_lnX
    myData=gnoise(1) + 5
    myData_X[] = 50+x
    myData_lnX = ln(myData_X[p])
   
    // make first plot
    Display myData vs myData_lnX
    ModifyGraph mode=3,marker=8
    ModifyGraph mirror(left)=2
    AppendToGraph/T myData vs myData_X
    ModifyGraph log(top)=1,minor(top)=1
    ModifyGraph mode(myData#1)=2,rgb(myData#1)=(65535,65535,65535) // set to white dots to hide re-plot
   
    // make second plot
    Make/O/N=7 myAxisTicks
    Make/O/T/N=7 myAxisTickLabels
    myAxisTicks={50,60,70,80,90,100,200}
    myAxisTickLabels = num2str(myAxisTicks[p])
    Display myData vs myData_lnX
    ModifyGraph mode=3,marker=8
    ModifyGraph mirror(left)=2
    AppendToGraph/T myData vs myData_X
    ModifyGraph log(top)=1,userticks(top)={myAxisTicks,myAxisTickLabels}
    ModifyGraph mode(myData#1)=2,rgb(myData#1)=(65535,65535,65535)
End


Hope this helps,
Kurt
You can add functions to TransformAxis. After you've loaded the TransformAxis package, you can compile a procedure containing the following function:
Function TransAx_lnT(w, x)
    // If axis is ln(T), this transforms it to show just T
    Wave/Z w
    Variable x
    Return exp(x)
end

It will add a "lnT" function to the New Transform Axis panel's Function pulldown menu.

It's up to you to determine if the TransformAxis package is robust enough to do what you want after that.
ajleenheer wrote:
You can add functions to TransformAxis. After you've loaded the TransformAxis package, you can compile a procedure containing the following function:
Function TransAx_lnT(w, x)
    // If axis is ln(T), this transforms it to show just T
    Wave/Z w
    Variable x
    Return exp(x)
end

It will add a "lnT" function to the New Transform Axis panel's Function pulldown menu.

It's up to you to determine if the TransformAxis package is robust enough to do what you want after that.



Worked like a charm. Thanks everyone!

Alex Abelson
Graduate Researcher
UC Irvine