xsize=10
ysize=8
size xsize ysize
pt=0.0352777778 ! 1 postscript point

fs=12*pt  !font size
tt=4*pt   !tick length
lw=0.5*pt !line width
glw=2*lw  !graph line width
ms=4*pt   !marker size

! graph settings
xmn=0
xmx=1
ymn=0
ymx=20/135.538817

set lwidth lw
set hei fs
set just tl

! funky LaTeX commands
begin texpreamble
    % set fonts used for text and maths to Palatino
    \usepackage{mathpazo}
    \renewcommand{\familydefault}{ppl}
    \usepackage{upgreek}
    \usepackage{siunitx}
end texpreamble

! set the normal font to AvantGarde-Demi, which is really obviously
! different to Palatino, so you can spot it if you forget to wrap
! text in \tex{}
set font psagd 

glw=2*lw

begin graph
 size xsize ysize
 scale auto
 nobox
  
 xtitle "\tex{$r$ (nm)}"
 let d1=1e-7*9.27400915e-24/(x*1e-9)^3
 let d2=d1*2
 
 xaxis min xmn max xmx dticks 0.5 dsubticks 0.1
 xaxis format "round 1 prepend \tex{$ append $}"
 xticks length tt
 
 ytitle "\tex{$B/\mu$ (\si{\milli\tesla}/$\mu_{\mathrm{B}}$)}"
 yaxis min ymn max ymx dticks 0.05 dsubticks 0.01
 yaxis format "round 1 prepend \tex{$ append $}"
 yticks length tt
 
 y2title "\tex{$\nu / \mu$ (\si{\mega\hertz}/$\mu_{\mathrm{B}}$)}"
 y2places 0/135.538817 5/135.538817 10/135.538817 15/135.538817 20/135.538817
 y2names \tex{$0$} \tex{$5$} \tex{$10$} \tex{$15$} \tex{$20$}
 y2axis dsubticks 1/135.538817

 d1 lstyle 1 color blue
 d2 lstyle 3 color red
end graph

set color blue
amove 2.5 2
text \tex{off-axis}
set color red
amove 3.8 5.05
text \tex{on-axis}