TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

    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\x>50 \color{white}\fi%

\begin{table}\caption{Correlation or something}
\pgfplotstabletypeset[color cells]{

(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.

share|improve this question
Welcome to TeX.SX! – Claudio Fiandrino Dec 3 '13 at 11:05

Ahhh I found it, pretty simple actually: I start the tabe with the attribute 'columns/a/.style={reset styles,string type}' :

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

Where 'a' is the name of my first column !

Hope this helps someone else ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.