[Tex/LaTex] TikZ change reference point

tikz-pgf

In TikZ, picture is drew based on the point (0,0). if my whole picture is based on the point, e.g., (20,0)? how can i draw it easily? it is better to transform the reference point from (0,0) to (20.0). i tried this:

  \begin{tikzpicture}[shift={(20mm,0)}]

but it didn't work. shift works for many commands, but it seems that it doesn't work for environment. it is not good to add shift option to every command.

@Martin: adding shift with scope seemed to have no influence on the whole picture. i want the two grids to move to the right. for the whole picture, there will have many other items. to construct the picture easily, it is better to refer to the point (0,0). but for the whole picture display, it is better to put it based on the point (20,0)

\documentclass[titlepage,a4paper]{article}

\usepackage{tikz}
\usepackage[lmargin=2.500000cm,rmargin=2.500000cm,tmargin=2.500000cm,bmargin=2.500000cm]{geometry}

\begin{document}
\section[General remarks]{General remarks}
\subsection[Geometry and coordinate system]{Geometry and coordinate system}
The main layout of the structure is adopted:\\

\begin{tikzpicture}[scale=1,thick]
  \begin{scope}[shift={(20mm,0)}]
    \foreach \xoffset in {0,5.2}
    {
      \begin{scope}[shift={(\xoffset,0)}]
      \draw[xstep=1,ystep=1] (0,0) grid (5,5);
      \end{scope}
    }
  \end{scope}
\end{tikzpicture}
\end{document}

Best Answer

Shifting the whole picture doesn't make much sense. TikZ cuts every picture to its minimal bounding box. Therefore drawing from e.g. (0,0) to (10,10) or from (100,100) to (110,110) will give you the same visual result!

If you want to "move the picture 20mm to the right" you can put an otherwise empty path which includes (-20mm,0), so that the bounding box will be extended for this amount:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\section[General remarks]{General remarks}
\subsection[Geometry and coordinate system]{Geometry and coordinate system}
The main layout of the structure is adopted:\\

\begin{tikzpicture}[thick,scale=1]
    \path (-20mm,0);
    \foreach \xoffset in {0,5.2}
    {
      \begin{scope}[shift={(\xoffset,0)}]
      \draw[xstep=1,ystep=1] (0,0) grid (5,5);
      \end{scope}
    }
\end{tikzpicture}
\end{document}

If this isn't what you want tell me please.