40

The two pictures are too similar to have right next to each other, therefore additional spacing is preferred. The code is as follows:

\begin{figure}
   \centering
   \begin{subfigure}[b]{0.35\textwidth}
       \includegraphics[width=\textwidth]{1_0.png}
       \caption{1}
       \label{fig:table2}
   \end{subfigure}
   \begin{subfigure}[b]{0.35\textwidth}
       \includegraphics[width=\textwidth]{1_4.png}
       \caption{2}
       \label{fig:table2}
    \end{subfigure}
    \caption{Tabels}\label{fig:animals}
\end{figure}
Erik
  • 409

2 Answers2

51

Use \hspace{amount} or \hfill if you want the right subfigure get shifted to the right margin between the two subfigures:

\begin{figure}
   \centering
   \begin{subfigure}[b]{0.35\textwidth}
       \includegraphics[width=\textwidth]{1_0.png}
       \caption{1}
       \label{fig:table2}
   \end{subfigure}\hfill% or \hspace{5mm} or \hspace{0.3\textwidth}
   \begin{subfigure}[b]{0.35\textwidth}
       \includegraphics[width=\textwidth]{1_4.png}
       \caption{2}
       \label{fig:table2}
    \end{subfigure}
    \caption{Tabels}\label{fig:animals}
\end{figure}

Note that \hspace{x} must be followed by a %char immediately to prevent extra spaces.

Tobi
  • 56,353
0

Depending on the space, you can also use \hspace*{\fill}

bim
  • 180