Are there standard color schemes defined for surface plots of pgfplots?
Like the summer, winter, jet etc.. of Matlab.
Are there standard color schemes defined for surface plots of pgfplots?
Like the summer, winter, jet etc.. of Matlab.
For a quick solution, I add the following here (activate with \pgfplotsset{colormap/<name>}):
viridis
hot
hot2
jet
blackwhite
bluered
cool
greenyellow
redyellow
violet
There are a lot of standard colormaps defined in PGFPlots. For that have a look at at the PGFPlots manual (v1.14)
Of course you can also create your own colormaps either from scratch or combine colormaps from already existing ones or newly created. Here I present an example which is copied from the manual
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.14,
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
view={0}{90},
colormap={whiteblue}{color=(blue) color=(white)},
colormap={gb}{color=(green) color=(yellow)
color=(brown)},
colorbar horizontal,
colorbar style={minor x tick num=1},
y dir=reverse,
]
% The table file is packed into the archive
% `doc/latex/pgfplots/pgfplots.doc.src.tar.bz2'
\addplot3 [
contour filled={
levels from colormap={
of colormap={
whiteblue,
target pos max=,
target pos={-12000,-10000,-6000,
-5000,-3000,-1000,-750,-500,
-250,-100,-50,0}
},
of colormap={
gb,
target pos min=,
target pos={10,100,200,500,1000,
1100,1200, 1500,2000,4000,
6000,8000}
},
},
},
] table {heightmap.dat};
\end{axis}
\end{tikzpicture}
\end{document}