I am trying to use non-uniform colormap and I get this error:
Package pgfplots Error: Sorry, non-uniform colormaps are only partially implemented, yet: the provided points must be multiples of the mesh width h=0.2275pt (but I found one with H/h = 0.68292pt/0.2275pt = 3+-0.0019 which is no integer). Perhaps it helps to provide the mesh widths as argument as in {<name>}{[1cm] <color arguments>}? The error occured near `rgb255(0.032cm)=(0,0,74)'.
I do not quite unrestand the error and how to workaround to prevent it. Can you help me with this? Below is the MWE.
I wo
\documentclass{minimal}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{filecontents}{surfdata.dat}
0 0 0.8
1 0 0.56
2 0 0.5
3 0 0.75
0 2 0.6
1 2 0.3
2 2 0.21
3 2 0.3
0 4 0.68
1 4 0.22
2 4 0.25
3 4 0.4
0 6 0.7
1 6 0.5
2 6 0.58
3 6 0.9
\end{filecontents}
\pgfplotsset{colormap/special/.style={colormap={iron}{rgb255(0cm)=(0,0,0) rgb255(0.008cm)=(0,0,30) rgb255(0.032cm)=(0,0,74) rgb255(0.072cm)=(13,0,117) rgb255(0.123cm)=(52,0,142) rgb255(0.182cm)=(93,0,154) rgb255(0.245cm)=(139,0,157) rgb255(0.308cm)=(176,1,152) rgb255(0.368cm)=(197,12,140) rgb255(0.418cm)=(211,32,113) rgb255(0.457cm)=(222,50,74) rgb255(0.482cm)=(227,61,38) rgb255(0.49cm)=(228,65,29) rgb255(0.55cm)=(237,91,6) rgb255(0.611cm)=(244,115,0) rgb255(0.725cm)=(253,168,0) rgb255(0.794cm)=(254,200,0) rgb255(0.845cm)=(255,220,18) rgb255(0.9cm)=(255,238,87) rgb255(1cm)=(255,255,255)}}}
\begin{document}
\begin{tikzpicture}
\begin{axis}[colormap/special,colorbar horizontal,point meta min=0,point meta max=1]
\addplot3[surf,shader=interp] file {surfdata.dat};
\end{axis}
\end{tikzpicture}
\end{document}