xsize=10
ysize=6
size xsize ysize

begin texpreamble
    % set fonts used for text and maths to Palatino
    \usepackage{mathpazo}
    \renewcommand{\familydefault}{ppl}
    \usepackage{upgreek}
    \usepackage[load=abbr]{siunitx}
    \usepackage{bm}
end texpreamble

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

set hei fs
set lwidth lw
set just tl

xgraphsize=xsize
ygraphsize=ysize

! graph settings
xmn=0.2
xmx=0.4
ymn=0
ymx=35
xticks=0.1
xsubticks=0.05
yticks=10
ysubticks=5

amove 0 0
begin graph
    size xgraphsize ygraphsize
    scale auto
    nobox
    
    data Ba2NaOsO6-001-cant-010-0.2_muB.tsv d3=c1,c2  ! (a) starts at 001, finishes at  1  0  0, about 0  1  0
    data Ba2NaOsO6-011-cant-21-1-0.2_muB.tsv d2=c1,c2 ! (b) starts at 011, finishes at  1 -1  1, about 2  1 -1
    data Ba2NaOsO6-111-cant-11-2-0.2_muB.tsv d1=c1,c2 ! (c) starts at 111, finishes at -1  1  0, about 1  1 -2

    xtitle "\tex{$\mu$ ($\mu _{\mathrm{B}}$)}"
    xaxis min xmn max xmx dticks xticks dsubticks xsubticks
    xaxis format "round 1 prepend \tex{$ append $}"
    xticks length tt
    
    x2places 0.2 0.230940108 0.282842712 0.4 !0.58476088
    x2names \tex{$90$} \tex{$60$} \tex{$45$} \tex{$30$} !\tex{$20$}
    x2title "\tex{$\alpha$ ($^{\circ}$)}"
    x2subticks off

    ytitle "\tex{$g(\mu | \{\nu _i \})$ ($\mu_{\mathrm{B}}^{-1}$)}"
    yaxis min ymn max ymx dticks yticks dsubticks ysubticks
    yaxis format "round 1 prepend \tex{$ append $}"
    yticks length tt
    
    d3 color rgb(0.196078431,0,0.376470588) lstyle 3 lwidth glw   ! (a)
    d2 color rgb(0,0.788235,0) lstyle 1 lwidth glw                ! (b)
    d1 color rgb(1,0.4,0) lstyle 5 lwidth glw                     !(c)
end graph

begin key
 nobox
 position tr
 offset 0 0.07
 llen 0.78
 text "\tex{$\hat{\bm{m}}\parallel [1\,0\,0]$, $\hat{\bm{n}}\parallel [0\,1\,0]$}"              ! (a)
 text "\tex{$\hat{\bm{m}}\parallel [\bar{1}\,1\,0]$, $\hat{\bm{n}}\parallel [1\,1\,\bar{2}]$}"  ! (c)
 text "\tex{$\hat{\bm{m}}\parallel [1\,\bar{1}\,1]$, $\hat{\bm{n}}\parallel [2\,1\,\bar{1}]$}"  ! (b)
 separator
 color rgb(0.196078431,0,0.376470588) lstyle 3 lwidth glw
 color rgb(1,0.4,0) lstyle 5 lwidth glw
 color rgb(0.000000,0.788235,0.000000) lstyle 1 lwidth glw
end key

amove 1.3 5.7
tex "FM"

rmove 6.6 0
tex AFM
rmove 1.2 4*pt
rline 0.7 0 arrow end