I found some code to asign colors to table values with PGFplotstable, but unfortunately it is only designed for tables where the topmost row is a head row (which is ignored by postproc). I also need the first column to be ignored by postproc - probably realtively simple but I just cant find how to do it.

This is the code:

\pgfplotstableset{
color cells/.style={
col sep=comma,
string type,
postproc cell content/.code={%
\pgfkeysalso{@cell content=\rule{0cm}{2.4ex}%
\pgfmathsetmacro\y{min(100,max(0,abs(round(##1 * 0.5))))}%
\ifnum##1<0\edef\temp{\noexpand\cellcolor{blue!\y}}\temp\fi%
\ifnum##1>0\edef\temp{\noexpand\cellcolor{red!\y}}\temp\fi%
\pgfmathtruncatemacro\x\y%
\ifnum\x>50 \color{white}\fi%
##1}%
}
}
}

\begin{table}\caption{Correlation or something}
\centering
\pgfplotstabletypeset[color cells]{
a,b,c,d
x,-300,-200,-100
y,0,100,200
z,300,40,800
}
\end{table}


(original source is: Drawing heatmaps using TikZ)

The code does not work, as the values in the first column are not numbers - i just want to ignore them, leaving those cells as they are.

-
Welcome to TeX.SX! – Claudio Fiandrino Dec 3 '13 at 11:05

\pgfplotstabletypeset[color cells, columns/a/.style={reset styles,string type}]