\documentclass[crop,tikz]{standalone}% 'crop' is the default for v1.0, before it was 'preview'
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepgfplotslibrary{groupplots}

\input{setup.tex}

\begin{document}
\usepgfplotslibrary{fillbetween}
\pgfplotstableread[col sep=comma]{quantize/MNIST-Bottleneck-2/quantized_layer_8_bits.csv}\iplane

\begin{tikzpicture}[
    compression/.style={
      ->,
      line width=2pt,
      color=black,
    }
  ]
	\begin{groupplot}[group style={group size= 1 by 1, horizontal sep=3cm,vertical sep=0cm}]
		\nextgroupplot[IB axis MNIST,IB colorbar single]
			\addplot[IB plot REAL5] table[x=x,y=y]{\iplane};
	\end{groupplot}

  % Compression arrow, layer -1
	\node (cs1) at (4.5,5.7){};
       	\node (cd1) at (3.4,6.3){};
	
  \draw[compression](cs1) -- node[anchor=center, above=3mm] {\bf\small Compression in 2D layer} (cd1);

  % Labels
  \node at (0.57,0.52){$\hat Y=T_5$};
  \node at (1.6,0.2){$T_4$};
  \node at (4.4,2.4){$T_3$};
  \node at (6.7,5.8){$T_2$};
\end{tikzpicture}

\end{document}
