# How to make the equivalent of a seaborn heatmap?

I have been shifting to tikz to do my plots recently (from matplotlib), and I have to say I kind of like it a lot. It's very nice to have everything coherent, in font, code, colors and so on!

Unfortunately, I have not been able to reproduce yet the heatmap kind of plot. I have seen examples of course, but nothing that reached the quality of those made with the seaborn library in Python:

I would like to ask if someone would know how to approach this?

Best, Pierre

pgfplots can do matrix plots.

\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer}

\begin{document}

\begin{tikzpicture}
\begin{axis}[enlargelimits=false,colorbar,colormap/Purples]
coordinates {
(0,0) [0] (1,0) [1] (2,0) [2]

(0,1) [3] (1,1) [4] (2,1) [5]

(0,2) [6] (1,2) [7] (2,2) [8]
};
\end{axis}
\end{tikzpicture}

\end{document}


• very nice +1 for your answer. – Sebastiano Dec 12 '17 at 10:17
• @Sebastiano Pff, I just copied the manual. – Henri Menke Dec 12 '17 at 10:47
• Hello Henri, and thank you for your answer! I must apologize as I badly formulated the question... I had stopped working on it for some time, sorry. I've found an answer for the loading of the dataframe-like data here: tex.stackexchange.com/questions/42444/… Thank you again, Pierre. – Pierre Dec 13 '17 at 12:52