xsize=4.9
ysize=2.6
size xsize ysize

pt=0.0352777778 ! 1 postscript point

! funky LaTeX commands
begin texpreamble
    % set fonts used for text and maths to Palatino
    \usepackage{mathpazo}
    \renewcommand{\familydefault}{ppl}
    \usepackage{upgreek}
    \usepackage{textcomp}
    \newcommand{\murm}{%
      \ifmmode
        \mathchoice
            {\hbox{\normalsize\textmu}}
            {\hbox{\normalsize\textmu}}
            {\hbox{\scriptsize\textmu}}
            {\hbox{\tiny\textmu}}%
      \else
        \textmu
      \fi
    }
    \usepackage{bm}
end texpreamble

fs=12*pt  !font size
lw=0.5*pt !line width

set hei fs
set just bl
set texscale scale

set lwidth 2*lw

startposx=0.7
startposy=0.2
thetadeg=25
arrowlen=3
longarrowlen=4
thetaarcsize=0.5
displacetext=0.15

theta=thetadeg/180*3.14159
diamlen=2*arrowlen*sin(theta)

! long arrow for B
amove startposx startposy
rline longarrowlen*cos(theta) longarrowlen*sin(theta) arrow end
rmove displacetext*cos(theta) displacetext*sin(theta)-fs*0.3
tex "$\bm{B}$"

! arrow for spin
amove startposx startposy
rline arrowlen 0 arrow end
rmove displacetext -fs*0.3
tex "$\bm{s}_{\murm}$"

!circle
set lwidth lw
amove startposx+arrowlen-diamlen*sin(theta)/2 startposy+diamlen*cos(theta)/2
begin rotate thetadeg
  elliptical_arc arrowlen*sin(theta)/4 arrowlen*sin(theta) 140 325 arrow start
  elliptical_arc arrowlen*sin(theta)/4 arrowlen*sin(theta) 320 145 arrow start
end rotate

! dashed arrow opposite spin
set lstyle 2
amove startposx startposy
rline arrowlen*cos(2*theta) arrowlen*sin(2*theta)
! dashed arrow for circle diameter
rline diamlen*sin(theta) -diamlen*cos(theta)

! muon
set lstyle 1
amove 0 0
tex "\murm $^+$"
amove startposx startposy
circle 0.1 fill rgb255(255/1.2,209/1.2,35/1.2)

! theta
amove startposx startposy
arc thetaarcsize 0 thetadeg
rmove thetaarcsize*1.5 0.05
tex "$\theta$"