Posted as an answer to


Edit and compile if you like:

% Posted as an answer to


  \foreach \y [count=\n] in {
    } {
      % column labels
        \node[minimum size=6mm] at (\n, 0) {\n};
      % heatmap tiles
      \foreach \x [count=\m] in \y {
        \node[fill=yellow!\x!purple, minimum size=6mm, text=white] at (\m,-\n) {\x};

  % row labels
  \foreach \a [count=\i] in {a,b,c,d,e,f,g,h,i} {
    \node[minimum size=6mm] at (0,-\i) {\a};

Click to download: heatmap.tex
Open in Overleaf: heatmap.tex
This file is available on and on GitHub and is MIT licensed.
See more on the author page of Janosh Riebesell..

Leave a Reply

Your email address will not be published.