2

The following codes output only the line but the figures are disappeared. Could anybody suggest how to force both the drawn line and the figures in the output? Many thanks!

\begin{figure}[ht!]
\begin{picture}(300,570)(0,80)
\begin{tikzpicture}
\put(0,440){\includegraphics[width=5.8in]{s1cbymax}}
\put(0,330){\includegraphics[width=5.8in]{s1f0bymax}}
\put(0,220){\includegraphics[width=5.8in]{s1f1bymax}}
\put(0,110){\includegraphics[width=5.8in]{s1f2bymax}}
\put(0,0){\includegraphics[width=5.8in]{s1f3bymax}}
\put(-10,360){\begin{sideways}\small$y^*$\end{sideways}}
\put(210,75){\small$\bar{u}/u_c$}

\put(210,75){\draw (30,0)--(30,5);}

\end{tikzpicture}
\end{picture}
\caption[$Set\:1$: Velocity profile normalized by maximum velocity]{$Set\:1$: Velocity profile normalized by maximum velocity.}
\label{s1profilebymax}
\end{figure}
2

The figures reappeared if you use the tikzpictureenvironment inside the \put command instead of directly nested in the picture environment:

\begin{picture}(300,570)(0,80)
\put(0,440){\includegraphics[width=5.8in]{s1cbymax}}
\put(0,330){\includegraphics[width=5.8in]{s1f0bymax}}
\put(0,220){\includegraphics[width=5.8in]{s1f1bymax}}
\put(0,110){\includegraphics[width=5.8in]{s1f2bymax}}
\put(0,0){\includegraphics[width=5.8in]{s1f3bymax}}
\put(-10,360){\begin{sideways}\small$y^*$\end{sideways}}
\put(210,75){\small$\bar{u}/u_c$}
\put(210,75){\begin{tikzpicture}\draw (30,0)--(30,5);\end{tikzpicture}}
\end{picture}

or simpler

\put(210,75){\tikz\draw (30,0)--(30,5);}

However, I would not mix TikZ and the picture environment. I would use just TikZ.

  • 2
    @pban92: did it help? If yes, it would be great if you would mark the answer as accepted by clicking on the checkmark at the left of the answer. Otherwise perhaps you could tell what's missing. – Stefan Kottwitz Sep 12 '11 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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