This is my first question on Stack Exchange, and I am trying to create a heatmap with a header in LaTeX. I want to add a header (horizontal axes) that contains \backslash{Perplexity}{Learning Rate} and a vertical axes that provides more information about the table. My code is as follows:
\newcommand*{\MinNumber}{0.0}%
\newcommand*{\MidNumber}{0.5} %
\newcommand*{\MaxNumber}{1.0}%
%Apply the gradient macro
\newcommand{\ApplyGradient}[1]{%
\ifdim #1 pt > \MidNumber pt
\pgfmathsetmacro{\PercentColor}{max(min(100.0*(#1 - \MidNumber)/(\MaxNumber-\MidNumber),100.0),0.00)} %
\hspace{-0.33em}\colorbox{green!\PercentColor!yellow}{#1}
\else
\pgfmathsetmacro{\PercentColor}{max(min(100.0*(\MidNumber - #1)/(\MidNumber-\MinNumber),100.0),0.00)} %
\hspace{-0.33em}\colorbox{red!\PercentColor!yellow}{#1}
\fi
}
\newcolumntype{R}{>{\collectcell\ApplyGradient}c<{\endcollectcell}}
\renewcommand{\arraystretch}{0}
\setlength{\fboxsep}{3mm} % box size
\setlength{\tabcolsep}{0pt}
\begin{table}[H]
\begin{tabular}{*{11}{R}}
% \backslashbox{Perplexity}{Learn Late} 10 & 25 & 50 & 75 & 100 & 125 &
% 150 & 175 & 200 & 225 & 250 \\
0.76& 0.75& 0.76& 0.73& 0.75& 0.73& 0.74& 0.75& 0.74& 0.75&0.74\\
0.74& 0.73& 0.74& 0.72& 0.73& 0.73& 0.72& 0.74& 0.73& 0.75& 0.73\\
0.74& 0.75& 0.75& 0.74& 0.73& 0.72& 0.74& 0.75& 0.76& 0.75& 0.74\\
0.75& 0.73& 0.74& 0.74& 0.72& 0.72& 0.72& 0.76& 0.74& 0.71& 0.75\\
0.77& 0.76& 0.73& 0.75& 0.76& 0.75& 0.73& 0.73& 0.75& 0.73& 0.73\\
0.76& 0.77& 0.73& 0.75& 0.74& 0.76& 0.74& 0.74& 0.75& 0.72& 0.73\\
0.76& 0.78& 0.74& 0.75& 0.73& 0.75& 0.72& 0.75& 0.76& 0.73& 0.78\\
0.76& 0.79& 0.81& 0.75& 0.74& 0.74& 0.71& 0.75& 0.74& 0.71& 0.75\\
0.74& 0.73& 0.78& 0.76& 0.75& 0.71& 0.74& 0.78& 0.76& 0.77& 0.81\\
0.79& 0.79& 0.79& 0.74& 0.76& 0.74& 0.80& 0.71& 0.75& 0.77& 0.76\\
0.73& 0.75& 0.78& 0.76& 0.76& 0.74& 0.75& 0.75& 0.73& 0.76& 0.77\\
[![\end{tabular}
\caption{Conditional Probability Modification Trustworthiness}
\label{trust_cp_caffe}
\end{table}][1]][1]
Most of this LaTeX code were from this link
