I wish to put two graph together, one is on the left side, the other is one the right side. I use "minipage". However, using the below code, the first graph is on the top of the second graph. May some one help me?
Here is my code:
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{scalefnt}
\usetikzlibrary{shapes}
\begin{document}
\begin{figure}[htbp]
\hspace{-4mm}
\begin{minipage}{0.5\linewidth}]
\centering
%\includegraphics[width=2.3in]{image/CompositionalStucture}
%\input{trans}
\tikzset{
block/.style = {circle, draw,align=center,inner sep=0pt},
line/.style = {draw,->},
}
{\scalefont{1}
\begin{tikzpicture}[node distance=10mm]
\node[block,minimum size=3mm](s2) {1};
\node[block,right of =s2,anchor=center,minimum size=2mm] (s3){2};
\node[block, right of=s2,anchor=center,,minimum size=3mm] (s4) {};
\path[line] (-0.8,0)-- (s2){};
\path[line] (s2)-- node[above]{stop}(s4);
\path[line] (s2) to [out=120,in=40,looseness=5] node[above] {$\Sigma$}(s2);
\path[line] (s4) to [out=120,in=40,looseness=5]node[above] {$\Sigma$}(s4);
\end{tikzpicture}
}
\caption{Travel Agency Service (\TAS{})}
\label{fig:TAS}
\red{2}
\end{minipage}
\begin{minipage}{0.5\linewidth}
\centering
%\includegraphics[width=2.3in]{image/CompositionalStucture}
%\input{trans1}
\tikzset{
block/.style = {ellipse, draw,align=center,inner sep=0pt},
line/.style = {draw,->},
}
{\scalefont{1}
\begin{tikzpicture}[node distance=10mm]
\node[block,minimum size=3.5mm](s1) {(6,1)};
\node[block,minimum size=3.5mm,below of =s1](s2) {(7,1)};
\node[block,minimum size=3.5mm,below of = s2](s3) {(22,2)};
\path[line] (s1)-- node[right]{gc}(s2);
\path[line] (s2)-- node[right]{TER}(s3);
\end{tikzpicture}
}
\caption{Travel Agency Service (\TAS{})}
\label{fig:TAS}
\red{3}
\end{minipage}
\end{figure}
\end{document}
