Different top and bottom axes
sleepingawake86
I tried using the transform axes function with mirroring but it was placing the axis label inside of the graph instead of on the perimeter. It was also not connecting the top axis to the left axis leaving some white space in between. Does anyone have a suggestion of another method?
Function freetopEn()
// read current windowname
String Stw=WinName(0,1)
// make free axis called freetop
NewFreeAxis /T freetop
// do not mirror bottom, and put new axis on the top
modifygraph mirror(bottom)=0,freepos(freetop)=0
// connect top axis to bottom axis
ModifyFreeAxis freetop,master=bottom
// make waves for labels
make/T/O /N=10 $("ticklabel"+Stw)
make/O /N=10 $("tickposition"+Stw)
wave /T wlab=$("ticklabel"+Stw)
wave wpos=$("tickposition"+Stw)
// enter limiting values
GetAxis /Q bottom
wlab[0]=Num2str(1240/V_min)
wlab[1]=Num2str(1240/V_max)
// Couple positions to 1240/label wave
SetFormula wpos, "1240*(str2num("+NameofWave(wlab)+"[p]))^-1"
// open for editing, user may enter more values
edit $("ticklabel"+Stw),$("tickposition"+Stw) as "Tick labels and positions for "+Stw
// attach waves to freeaxis
ModifyGraph userticks(freetop)={wpos,wlab}
print "Please enter tick labels in the table, tickpositions update accordingly"
End
January 22, 2013 at 02:06 pm - Permalink
The default location of the axis label is weird. Drag it to a better location, or double-click the axis and then change the position in the Label Options tab of the Modify Axis dialog.
The gap at the left axis is cause by Igor's "axis standoff". It prevents markers from obscuring the axis lines, but as you have found it can have less desirable effects.
Double-click the left axis, select the Axis tab, and turn off the Axis Standoff checkbox.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
January 23, 2013 at 05:42 pm - Permalink