I want to arrange three pictures drawn with tikzpicture horizontally. Unfortunately I can't make it work using any of the threads on a similar topic.
Thank you a lot for your help, best regards
Code:
\begin{figure}[!h]
\centering
\begin{subfigure}[b]{0.3\textwidth}
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\draw plot[domain=-1.3:1.3] ({\x,{(\x)^(2)+0.1*(\x)^(4)}});
% Optional: Add axes
\draw[-stealth] (-1.7,0) -- (1.7,0) node[right] {$M$};
\draw[-stealth] (0,-1.7) -- (0,1.7) node[above] {${\cal L}$};
\end{tikzpicture}
}
\caption{$T>T_c$}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\draw plot[domain=-1.4:1.4] ({\x,{0.5*(\x)^(4)}});
%Optional: Add axes
\draw[-stealth] (-1.7,0) -- (1.7,0) node[right] {$M$};
\draw[-stealth] (0,-1.7) -- (0,1.7) node[above] {${\cal L}$};
\end{tikzpicture}
}
\caption{$T=T_c$}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\resizebox{\linewidth}{!}{
\begin{tikzpicture}
\draw plot[domain=-1.6:1.6] ({\x,{-2*(\x)^(2)+(\x)^(4)}});
% Optional: Add axes
\draw[-stealth] (-1.7,0) -- (1.7,0) node[right] {$M$};
\draw[-stealth] (0,-1.7) -- (0,1.7) node[above] {${\cal L}$};
\end{tikzpicture}
}
\caption{$T<T_c$}
\end{subfigure}
\caption{Plot of the Landau free energy for different values $M$ and $t=\frac{T-T_c}{T_c}$ around criticality.\label{fig:phasetrans}}
\end{figure}
\resizebox{\linewidth}{!}{%and\end{tikzpicture}%with%– David Carlisle Jun 27 '16 at 11:43