# pgfplots ticks are not applied

I am trying to create a 3D plot with custom z-ticks. However I can not create them with starting negative number. It works however as expected when the ticks start at 0.

My code is this one

\begin{tikzpicture}
\begin{axis}[view={30}{30},grid=major,
/pgfplots/xtick={0,60,...,300},
/pgfplots/ytick={0,60,...,300},
/pgfplots/ztick={-1.0,0.2,...,1.0},
]
colormap/jet,colorbar]
{sin(x)*sin(y)};
\end{axis}
\end{tikzpicture}


with these results (the second with ztick={0,0.2,...,1.0}):

How do I get correct z-ticks from -1 to 1 with steps 0.2?

-
within the axis environment the extra /pgfplots should not be needed –  Martin H Nov 24 '11 at 14:07

The second number does not give the step size, but the next step. So try {-1.0,-0.8,...,1.0}, or, better, {-1.0,-0.8,...,-0.2,0.0,0.2,...,1.0} as in:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[view={30}{30},grid=major,
/pgfplots/xtick={0,60,...,300},
/pgfplots/ytick={0,60,...,300},
/pgfplots/ztick={-1.0,-0.8,...,-0.2,0.0,0.2,...,1.0},
]

I explicitly specified ...,-0.2,0.0,0.2,... because otherwise, you might get a tick of 10^{-5} instead of 0.