[Tex/LaTex] shifting (0,0) to new coordinate Tikz

tikz-pgf

I am using Tikz to draw a wide graph but starting from left and after reaching the middle of the graph the nodes fall outside of page. I tried playing with scale but the graph distorts and texts inside nodes does not conform to new scale well. So I need to move the (0,0) to some place left, say (-5,0) to have enough space to draw the rest of graph. How can I do that?
I saw the shifting command in the manual but it was command specific and converting the coordinates is somehow overkill.

How can I shift the (0,0) to a new coordinate, say (-5,0)?

Best Answer

If you want to do exactly this, then put whatever you want to move in a scope, and provide the shift option to said scope (the curly braces are necessary so the comma isn't thought to separate options). Something like

\begin{tikzpicture}
  \begin{scope}[shift={(-5,0)}]
    ... graph goes here ...
  \end{scope}
  ... other code goes here ...
\end{tikzpicture}

However, if your whole picture is wider than the text, this won't help. In that case, you should be able to use a negative horizontal space:

\hspace*{-5cm}%
\begin{tikzpicture}
  ... picture goes here ...
\end{tikzpicture}

However, if you want centering, you could check out some of the solutions to a similar problem with over-wide tables, such as surrounding it in a zero-width box.