Q:

Confusing behaviour of xslant in TikZ

I now want to draw two slanted grids on top of each other.
This is a minimal file which gives the wrong result:
\documentclass{article}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
  \draw[xslant=1] (0,0) grid[step=1] (6,4);   % bottom grid
  \draw[xslant=1] (0,9) grid[step=1] (6,13);  % upper grid
\end{tikzpicture}
\end{document}

The "upper" grid is pushed way over to the right, as though the xslant in the second command is augmented by the first.  If I change the second draw command to
\draw[xslant=0] (0,9) grid[step=1] (6,13);

then the grid is drawn in the correct position, but without the slant.
One way of putting it in the correct position is to use 
\draw[xslant=1] (-9,9) grid[step=1] ++(6,4);

as the second draw command, but that seems a bit crazy.  Surely I should be able to start that second grid at (0,9)?

A:

you are using the environment tikzpicture which defines the origin of a coordinate system. Both \draw commands refer to that origin (0,0). With [xslant=1] you have the y coordinate axis slanted and the point (0,9) is on that slanted y axis. The output is correct. Compare it with 
\documentclass{article}
\usepackage{tikz}
\begin{document}

%\begin{tikzpicture}
  \tikz\draw[xslant=1] (0,0) grid[step=1] (6,4);   % bottom grid
  \tikz\draw[xslant=1] (0,9) grid[step=1] (6,13);  % upper grid
%\end{tikzpicture}
\end{document}

You can use a node to put the single object:
\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
  \draw [very thin,color=gray] (0,0) grid (6,13);
  \draw[xslant=1,thick] (0,0) grid[step=1] (6,4);   % bottom grid
  \node at (5,11)  {\tikz\draw[xslant=1,thick] (0,0) grid[step=1] (6,4);};  % upper grid
\end{tikzpicture}
\end{document}

(5,11) is the center of the slanted grid. You can also place it with its lower left corner at (9,0) which makes no difference.

