# how to put two pictures side by side?

I try to put the two pictures side by side using the following code, however, the size of the two pictures are very small like the picture.

However, the picture looks like if I don't put them together.

I don't know why.

\usepackage[latin1]{inputenc}
\usetikzlibrary{trees}
\usepackage{verbatim}

\begin{figure}[htbp]
\begin{minipage}{0.5\linewidth}
\centering
\resizebox{.6\textwidth}{!}{
\tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}}
\tikzset{level 2/.style={level distance=0.7cm, sibling distance=5cm}}

\tikzset{bag/.style={text width=20em, text centered,yshift=-0.2cm}}
\begin{tikzpicture}[grow=down, -stealth,  edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=3mm}}]
{\node[bag]{$S_0{:}(A{<}a{=1}{>}B,G_{t_{i_1}},0)$}
child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{S_{n-1}{:}(stop_{good},t_{i_1}{\geq}2,0)} } child{edge from parent node{\times}; \node[bag]{S_n{:}(stop_{good},t_{i_3}{\geq}3,0)} }; } \end{tikzpicture}} \caption{A Circle} \label{fig:circle} \end{minipage}% \begin{minipage}{0.5\linewidth} \centering \resizebox{.6\textwidth}{!}{ \tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}} \tikzset{level 2/.style={level distance=0.7cm, sibling distance=5cm}} \tikzset{bag/.style={text width=20em, text centered,yshift=-0.2cm}} \begin{tikzpicture}[grow=down, -stealth, edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=3mm}}] {\node[bag]{S_0{:}(A{<}a{=1}{>}B,G_{t_{i_1}},0)} child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_{n-1}{:}(stop_{good},t_{i_1}{\geq}2,0)$}
}
child{edge from parent node{$\times$}; \node[bag]{$S_n{:}(stop_{good},t_{i_3}{\geq}3,0)$}
};
}
\end{tikzpicture}}
\caption{A Rectangle}
\label{fig:rectangle}
\end{minipage}
\end{figure}

-

You've resized the images with \resizebox. Part of the reason they're so small, is that within a minipage, \textwidth is set to the width of the minipage. Hence, when you set the width to be 0.6\textwidth within a minipage that is 0.5\linewidth, the width of the resizebox will be 0.3 of the \linewidth for the whole page.

In addition, because you've set the text width of the bag nodes to 20em, there is some whitespace on the sides of each tree, and the size of the \resizebox includes this whitespace.

Also, please include full examples, including all packages and libraries. Makes it easier for trying to help, not having to figure out which decorations library is missing.

See if this is a little better:

\documentclass{article}
\usepackage{tikz}
\usepackage[latin1]{inputenc}
\usetikzlibrary{trees,decorations.pathmorphing}
\tikzset{bag/.style={text width=10em, text centered,yshift=-0.2cm}}

\usepackage{verbatim}
\begin{document}
\the\textwidth
\begin{figure}[htbp]
\begin{minipage}{0.5\linewidth}
\the\textwidth
\centering
\resizebox{\textwidth}{!}{
\tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}}
\tikzset{level 2/.style={level distance=0.7cm, sibling distance=5cm}}

\begin{tikzpicture}[grow=down, -stealth,  edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=3mm}}]
{\node[bag]{$S_0{:}(A{<}a{=1}{>}B,G_{t_{i_1}},0)$}
child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{S_{n-1}{:}(stop_{good},t_{i_1}{\geq}2,0)} } child{edge from parent node{\times}; \node[bag]{S_n{:}(stop_{good},t_{i_3}{\geq}3,0)} }; } \end{tikzpicture}} \caption{A Circle} \label{fig:circle} \end{minipage}% \begin{minipage}{0.5\linewidth} \centering \resizebox{\textwidth}{!}{ \tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}} \tikzset{level 2/.style={level distance=0.7cm, sibling distance=5cm}} \begin{tikzpicture}[grow=down, -stealth, edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=3mm}}] {\node[bag]{S_0{:}(A{<}a{=1}{>}B,G_{t_{i_1}},0)} child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_{n-1}{:}(stop_{good},t_{i_1}{\geq}2,0)$}
}
child{edge from parent node{$\times$}; \node[bag]{$S_n{:}(stop_{good},t_{i_3}{\geq}3,0)$}
};
}+
\end{tikzpicture}}
\caption{A Rectangle}
\label{fig:rectangle}
\end{minipage}
\end{figure}
\end{document}

-
 thanks, it does look bigger, however, still small:( – sweetyBaby Aug 14 '12 at 16:16 Of course, it's still resized -- the "original" is wider than .5\linewidth. You can of course make the minipages wider, if having the figure protruding into the margin is no problem. If you don't want them resized, don't place them side by side. – Torbjørn T. Aug 14 '12 at 17:02