I found on pgfplots
manual ho to have an horizontal colorbar (simply specifying the colorbar horizontal
option) but how can I put it above the axis? By default pgfplots
puts it below the axis..
Here a MWE:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
view={0}{90}
colormap/cool,
colorbar horizontal]
\addplot3[surf,shader=flat] {x+y};
\end{axis}
\end{tikzpicture}
\end{document}