\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}*.85}
	\def\xLeftPosRel{-0.03*\pgfkeysvalueof{/pgfplots/xmax}}
	\def\xLeftPosRelFirst{-0.01*\pgfkeysvalueof{/pgfplots/xmax}}
	\def\xRightPosRel{\pgfkeysvalueof{/pgfplots/xmax}*.96}
	\def\yLabelLinecut{$\chi'' \tanh \bigl( \frac{\hbar\omega}{2k_BT}\bigr)$}
	\begin{groupplot}[view={0}{90},
	colormap name = viridis,
	ylabel={$\hbar \omega$ (meV)},
	ylabel style = {yshift=-0.1cm},
	xmin=0,
	ymin=0,
	ymax=0.69,
	height=4cm,
	point meta min=0,
	point meta max=4,
	group/xlabels at = edge bottom,
	group style = {group size = 7 by 1,	%cols by rows
		horizontal sep=0.1cm,
		vertical sep=0.1cm,
		xlabels at = edge bottom
	}]
	
	%%% Row 1
	\nextgroupplot[
	height=5cm,
	title={~}, title style = {at = {(axis description cs:0.5,0.975)}}, 
	xtick = {0,1.5708,3.14159,4.7123889,6.28318},
	xticklabels = {0,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$,},
	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$},
	ylabel={$\hbar\omega$ (meV)},
	enlargelimits=false,
	axis on top,
	colorbar horizontal, 
	every colorbar/.append style={
		at={(0,1.25)},anchor=north west,
		width=
		1*\pgfkeysvalueof{/pgfplots/parent axis width}+
		0*\pgfkeysvalueof{/pgfplots/group/horizontal sep},
		xlabel={Exp. $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 ($(\xLeftPosRelFirst,\yPosRel)$) {(a)};
	\node [color=white, anchor=east] at ($(\xRightPosRel,\yPosRel)$) {$0$ T};
	
	
	
	\nextgroupplot[title={$S^{xx}$ correction}, xshift=1.5cm, yshift=2.5cm, 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={0.0,,0.5},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={},
	ylabel={$\hbar\omega$ (meV)},
	point meta min=0,
	point meta max=1,]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ExpTwoTangle/CorrectionFactor_Sxx_0T.pgfplots};
	\node [color=white, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(b)};
	\pgfplotsset{colormap/jet}
	
	
	\nextgroupplot[title={$S^{yy}$ correction}, 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={},
	point meta min=0,
	point meta max=1,]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ExpTwoTangle/CorrectionFactor_Syy_0T.pgfplots};
	\node [color=white, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(c)};
	\pgfplotsset{colormap/jet}
	
	
	\nextgroupplot[title={$S^{zz}$ correction}, 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={},
	point meta min=0,
	point meta max=1,
	colorbar,
	every colorbar/.append style={at={(1.1,0)},anchor=south west,
		ytick={0,0.5,1},
		ytick pos=right,
		yticklabel style={
			/pgf/number format/.cd,
			fixed,
			precision=1,
			fixed zerofill,
	}
		}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ExpTwoTangle/CorrectionFactor_Szz_0T.pgfplots};
	\node [color=white, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(d)};
	\pgfplotsset{colormap/jet}
	
	
	
	
	
	\nextgroupplot[title={Corrected $S^{xx}$}, xshift=-9.5cm, yshift=-3.0cm, 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 = {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$},
	ylabel={$\hbar\omega$ (meV)},
	point meta min=0,
	point meta max=2,]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ExpTwoTangle/experiment_Sxx_0T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(e)};
	
	
	
	\nextgroupplot[title={Corrected $S^{yy}$}, 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 = {0,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={$k$},
	ylabel={},
	point meta min=0,
	point meta max=2,]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ExpTwoTangle/experiment_Syy_0T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(f)};
	
	
	\nextgroupplot[title={Corrected $S^{zz}$}, 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 = {$0$,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$,},
	ytick={0.0,0.25,0.5},
	yticklabels = {,,},
	xlabel={$k$},
	ylabel={},
	point meta min=0,
	point meta max=2,
	colorbar,
	every colorbar/.append style={at={(1.1,0)},anchor=south west,
		ylabel near ticks,
		ylabel={$S(k,\hbar\omega)$ (meV$^{-1}$)},
		ylabel style={rotate=180},
		ytick={0,1,2},
		ytick pos=right,
		yticklabel style={
			/pgf/number format/.cd,
			fixed,
			precision=1,
			fixed zerofill,
		}
		}]
	\addplot [matrix plot*,point meta=explicit] table [meta index={2}] {ExpTwoTangle/experiment_Szz_0T.pgfplots};
	\node [color=black, anchor=west] at ($(\xLeftPosRel,\yPosRel)$) {(g)};
	
	\end{groupplot}
	
	\begin{groupplot}[view={0}{90},
	colormap name = viridis,
	height=7.5cm,
	group/xlabels at = edge bottom,
	group style = {group size = 2 by 1,	%cols by rows
		horizontal sep=1.9cm,
		vertical sep=0.1cm,
		xlabels at = edge bottom
	}]
	
	
	
	\nextgroupplot[title={},
	yshift=-7.75cm,
	title style = {at = {(axis description cs:0.5,0.9)}},
	enlargelimits=false,
	axis on top,
	xtick = {0,0.25,0.5,0.75,1,1.5,2},
	xticklabels = {$0$,$\frac{\pi}{2}$,$\pi$,$\frac{3\pi}{2}$,$2\pi$,},
	ymode=log,
	ymin=0.02,
	ymax=10,
	xlabel={$k$},
	ylabel={$S(k)$},
	log ticks with fixed point,]
	\node [color=black, anchor=west] at ($(0.085,5.5)$) {(h)};
	\addplot[very thick, black, mark=, solid, mark options={solid}] table [x index=0, y index=1, col sep=space] {ExpTwoTangle/EXP_SQ_0T.dat};
	\addplot[very thick, virmiddle, mark=, dotted, mark options={solid}] table [x index=0, y index=2, col sep=space] {ExpTwoTangle/EXP_SQ_0T.dat};
	\addplot[very thick, viryellowdark, mark=, densely dashed, mark options={solid}] table [x index=0, y index=3, col sep=space] {ExpTwoTangle/EXP_SQ_0T.dat};
	\legend{\textcolor{black}{$S^{xx}(k)$},\textcolor{virmiddle}{$S^{yy}(k)$},\textcolor{viryellowdark}{$S^{zz}(k)$}};
	
	
	
	
	\nextgroupplot[title={}, %xshift=1.5cm, yshift=0cm, height=7cm,
	title style = {at = {(axis description cs:0.5,0.9)}},
	enlargelimits=false,
	axis on top,
	xmin=-10,
	xmax=10,
	ymin=-0.3,
	ymax=0.4,
	xtick = {-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10},
	xticklabels = {-10,,,,,-5,,,,,0,,,,,5,,,,,10},
	ytick={-0.2,0.0,0.2,0.4},
	yticklabels={-0.2,0.0,0.2,0.4},
	yticklabel style = {/pgf/number format/fixed, /pgf/number format/zerofill, /pgf/number format/precision=1, },
	xlabel={$r$ (l.u.)},
	ylabel={$g_r^\alpha$},]
	\node [color=black, anchor=west] at ($(-10,\yPosRel)$) {(i)};
	\addplot[very thick, black, mark=, solid, mark options={solid}] table [x index=0, y index=1, col sep=space] {ExpTwoTangle/EXP_Gr_0T.dat};
	\addplot[very thick, virmiddle, mark=, dotted, mark options={solid}] table [x index=0, y index=2, col sep=space] {ExpTwoTangle/EXP_Gr_0T.dat};
	\addplot[very thick, viryellowdark, mark=, densely dashed, mark options={solid}] table [x index=0, y index=3, col sep=space] {ExpTwoTangle/EXP_Gr_0T.dat};
	
	\legend{\textcolor{black}{$g_r^x$},\textcolor{virmiddle}{$g_r^y$},\textcolor{viryellowdark}{$g_r^z$}};
	
	\end{groupplot}
	\end{tikzpicture}
\end{document}
