# TikZ picture overlaps with text

I have a TikZ picture that overlaps with the text. I'm sure this one is easy, but I didn't find a solution.

Here is a snapshot:

And this is the code:

\section{Algorithm Outline}

blabla

\begin{figure}[H]
\selectlanguage{american}%
\begin{centering}
\ttfamily

\begin{tikzpicture}[node distance = 2cm,
auto, x=1cm, y=1cm,  transform canvas={scale=0.62},
>=stealth]
[picture code]

\end{tikzpicture}
\par\end{centering}

\selectlanguage{english}%
\caption{Algorithm Outline}
\end{figure}

The focus of this paper is on finding a feasible and good ....


I hope someone has a solution.

This post is slightly different than TikZ picture overlaps with text (not wanted)

-
This is most likely because you're using transform canvas, which causes PGF to "[lose] track of positions of nodes and of picture sizes" (PGF manual). I would try setting scale=0.62, every node/.append style={transform shape}, but it's hard to test without some TikZ code. –  Jake Feb 11 '13 at 16:15
What's the purpose of the two \selectlanguage commands? In the standard setup, american and english do exactly the same. Note also that \centering is not an environment; just put \centering instead of \begin{centering} and remove \par\end{centering} –  egreg Feb 11 '13 at 16:36
@Jake: I tried your suggestion, unfortunately it does not work. Maybe there is another solution to scale the whole picture. Like in pstricks, where one can set the unit to a value like 0.5cm. –  Chris Feb 11 '13 at 16:53
@Chris: Yes, there's that option, and you're already using it to set your unit vectors to 1cm length (which is the default value). Could you specify what you mean with "it does not work"? –  Jake Feb 11 '13 at 16:56
@Jake: sorry for not being specific. I meant that there is no change, but in fact I made a mistake. Your solution does work! Thanks a lot! –  Chris Feb 11 '13 at 17:14

This happens because you're using transform canvas, which causes PGF to "[lose] track of positions of nodes and of picture sizes" (PGF manual).

Set scale=0.62, every node/.append style={transform shape} to use the "proper" way to scale your tikzpicture.

-