Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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)?

share|improve this question
add comment

1 Answer

up vote 15 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.