1 2 3 4 5 6
\begin{tikzpicture} \tkzInit[xmax=3, ymax=3] \tkzGrid \tkzAxeXY \tkzClip[space=-0.5] \draw[red] (-0.5,-0.5)--(3.5,3.5); \end{tikzpicture}