xsize=10
ysize=6
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=50
xticks=10
xsubticks=5
ymn=0
ymx=0.25
yticks=0.1
ysubticks=0.05

pi=3.1415926535897932

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
ms=4*pt

! some constants
pulsedtomuB_25T = 12100
pulsedtomuB_45T = 12200

begin graph
 size xsize ysize
 scale auto
 nobox
  
 data b25t4p5.dat d3=c1,c2 ! Li 25 T M(B) @ 4.5 K
 data b45t4p3.dat d1=c1,c2 ! Li 45 T M(B) @ 4.3 K
 let d3=d3*pulsedtomuB_25T
 let d1=d1*pulsedtomuB_45T
  
 xtitle "\tex{$B$ (\si{\tesla})}"
 xaxis min xmn max xmx dticks xticks dsubticks xsubticks
 xaxis format "round 1 prepend \tex{$ append $}"
 xticks length tt
 xaxis min xmn max xmx! dsubticks 10000 
 ytitle "\tex{$M$ ($\mu _{\mathrm{B}}$/f.u.)}" dist 0.05
 yaxis min ymn max ymx dticks yticks dsubticks ysubticks
 yaxis format "round 1 prepend \tex{$ append $}"
 yticks length tt
 
 d1 color rgb(0.196078431,0,0.376470588) lstyle 2
 d3 color rgb(0.196078431,0,0.376470588) lstyle 1
end graph

begin key
 pos tl
 nobox
 text "\tex{Ba$_{2}$LiOsO$_{6}$}"
end key

begin key
 pos br
 lstyle 1 color rgb(0.196078431,0,0.376470588) text "\tex{\SI{25}{\tesla} shot}"
 lstyle 2 color rgb(0.196078431,0,0.376470588) text "\tex{\SI{45}{\tesla} shot}"
end key