\documentclass{standalone}
\input{palette}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usepgfplotslibrary{colormaps}
\usepgfplotslibrary{groupplots}
\sffamily


\begin{document}
	\begin{tikzpicture}
	\def\yPosRel{\pgfkeysvalueof{/pgfplots/ymax}*.84}
	\def\xLeftPosRel{-0.01*\pgfkeysvalueof{/pgfplots/xmax}}
	\def\xRightPosRel{\pgfkeysvalueof{/pgfplots/xmax}*.97}
	\def\yLabelLinecut{$\chi'' \tanh \bigl( \frac{\hbar\omega}{2k_BT}\bigr)$}
	\begin{groupplot}[view={0}{90},
	colormap name = viridis,
	xlabel=$k$,
	ylabel={$\hbar \omega$ (meV)},
	ylabel style = {yshift=-0.1cm},
	xmin=0,
	ymin=0,
	ymax=0.69,
	height=4cm,
	width=6cm,
	point meta min=0,
	point meta max=4,
	group/xlabels at = edge bottom,
	group style = {group size = 3 by 9,	%cols by rows
		horizontal sep=0.1cm,
		vertical sep=0.1cm,
		xlabels at = edge bottom
	}]
	
	%%% Row 1
	\nextgroupplot[title={INS}, title style = {at = {(axis description cs:0.5,.9)}}, 
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	colorbar horizontal, 
	every colorbar/.append style={
		at={(0,1.4)},anchor=north west,
		width=
		2*\pgfkeysvalueof{/pgfplots/parent axis width}+
		1*\pgfkeysvalueof{/pgfplots/group/horizontal sep},
		xlabel={$S(k,\hbar\omega)$ (meV$^{-1}$)},
		xlabel near ticks,
		xtick={0,1,2,3,4,5,6,7},
		axis on top,
		xtick pos=top,
		xticklabel pos=top,
		xticklabel style={
			/pgf/number format/.cd,
			fixed,
			precision=0,
			fixed zerofill,
		}
	}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_0T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(a)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$0$ T};
	%Two-spinon continuum
	%\addplot [dashed, domain=0:2*pi, samples=401, white]{0.5*0.23*pi*sin(deg(1.318116))/1.318116*abs(sin(deg(x)))};
	%\addplot [dashed, domain=0:2*pi, samples=401, white]{0.23*pi*sin(deg(1.318116))/1.318116*abs(sin(deg(0.5*x)))};
	
	
	\nextgroupplot[title={DMRG}, title style = {at = {(axis description cs:0.5,0.9)}},
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_0.0T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(b)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$0$ T};
	\addplot [dashed, domain=0:2*pi, samples=401, white]{0.5*0.23*pi*sin(deg(1.318116))/1.318116*abs(sin(deg(x)))};
	\addplot [dashed, domain=0:2*pi, samples=401, white]{0.23*pi*sin(deg(1.318116))/1.318116*abs(sin(deg(0.5*x)))};
	
	
	
	\nextgroupplot[xshift=1.6cm,
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	xmin=-0.05,
	ymin=0,
	ymax=22,
	clip mode=individual,	%needed for lines on top of data point marks
	legend style={at={(1.0,1.0)},anchor=south east}
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_0T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_0.0T.dat};
	\legend{\textcolor{virmiddle}{INS}, \textcolor{virdark}{DMRG}};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(c)};
	
	
	
	%%% Row 2
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_0.5T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(d)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$0.5$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_0.52T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(e)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$0.52$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	xmin=-0.05,
	ymin=0,
	ymax=22,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_0.5T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_0.52T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(f)};
	
	
	
	%%% Row 3
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_1T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(g)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_1.0T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(h)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1.0$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	xmin=-0.05,
	ymin=0,
	ymax=12,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_1T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_1.0T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(i)};	
	
	
	
	%%% Row 4
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_1.5T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(j)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1.5$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_1.5T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(k)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1.5$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	ylabel style = {yshift=0.2cm},
	xmin=-0.05,
	ymin=0,
	ymax=6.75,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_1.5T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_1.5T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(l)};
	
	
	%%% Row 5
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_1.75T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(m)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1.75$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_1.7T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(n)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1.7$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	ylabel style = {yshift=0.2cm},
	xmin=-0.05,
	ymin=0,
	ymax=6.75,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_1.75T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_1.7T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(o)};
	
	
	%%% Row 6
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_2T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(p)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_1.96T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(q)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$1.96$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	ylabel style = {yshift=0.2cm},
	xmin=-0.05,
	ymin=0,
	ymax=6.75,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_2T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_1.96T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(r)};
	
	
	%%% Row 7
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_2.15T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(s)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2.15$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_2.1T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(t)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2.1$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	ylabel style = {yshift=0.2cm},
	xmin=-0.05,
	ymin=0,
	ymax=12,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_2.15T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_2.1T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(u)};
	
	
	%%% Row 8
	\nextgroupplot[
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_2.3T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(v)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2.3$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_2.36T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(w)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2.36$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {,,},
	xlabel={},
	ylabel={\yLabelLinecut},
	ylabel style = {yshift=0.2cm},
	xmin=-0.05,
	ymin=0,
	ymax=17,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_2.3T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_2.36T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(x)};
	
	
	
	%%% Row 9
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {0,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,},
	ytick={0.0,0.25,0.5},
	yticklabels={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={$k$},
	enlargelimits=false,
	axis on top,
	]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/experiment_outSpectrum_2.5T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(y)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2.5$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {0,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={$k$},
	ylabel={}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ProcessedSpectra/DMRG_outSpectrum_2.5T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(z)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$2.5$ T};
	
	
	\nextgroupplot[
	enlargelimits=false,
	axis on top,
	xtick = {0.00,0.25,0.50,0.75},
	xticklabels = {0.00,0.25,0.50,0.75},
	xticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=2, },
	xlabel={$\hbar \omega$ (meV), $k=\pi$},
	ylabel={\yLabelLinecut},
	xmin=-0.05,
	ymin=0,
	ymax=17,
	clip mode=individual,
	]
	\addplot[virmiddle, mark=*, only marks, mark options={solid}] table [x index=0,y index=1, col sep=space] {ProcessedSpectra/experiment_pi_integrand_2.5T.dat};
	\addplot[virdark, solid, very thick, mark=none, mark options={solid}] table [x index=0,y index=1, col sep=space,] {ProcessedSpectra/DMRG_pi_integrand_2.5T.dat};
	\node [color=black, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {(\aa)};
	
	\end{groupplot}
	\end{tikzpicture}
\end{document}
