# Local colormaps in global coordinate system

I am trying to get a surface graph with two colormaps. Instead of using the full Z range i want to give the first surface its own colormap and the second surface should receive its own colormap too (it may be even the same)... however the current version takes the full range of Z-Data and calculates the colormap. Is there any way?

\begin{tikzpicture}
\begin{axis}[grid = major, colormap={bw}{gray(0cm)=(0); gray(1cm)=(1)}, view={-30}{15}]

table
{DATA1.dat};

table
{DATA2.dat};

\end{axis}
\end{tikzpicture}


Right now it looks like that:

I want each of the surface to be scaled individually... just to see more clearly how the amplitude changes :)

Any ideas?

Thanks, Alex

-

To scale the colormap for each plot individually, set point meta rel=per plot:

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
grid = major,
colormap={bw}{gray(0cm)=(0); gray(1cm)=(1)},
view={-30}{15},
point meta rel=per plot
]

\end{axis}
\end{tikzpicture}
\end{document}


To use different color maps for different plots, specify the required color map in the \addplot options:

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
grid = major,
colormap={bw}{gray(0cm)=(0); gray(1cm)=(1)},
view={-30}{15},
point meta rel=per plot
]