0

I'm one of those new users and have a problem making a general code for side by side figures using subfigures. I've been reading and searching a lot but haven't found what I’m looking for. Can any of you pros help me making a general code for this?

What I want is to have two (or if wanted more pictures just by adding the general code) side by side so that the total figure (containing figure a, b, (c), (d) etc.) automatically adapt to the main text (see figure two here).

I know that subfigures package is the oldest of a series of package implementing commands for placing figures and tables side by side. But I have found out that it provides support for captioning and labeling of the sub-figures and sub-tables, which is missing? in the minipage environment.

The first figure shows what my code makes right now and the second figure is how I what it.

enter image description here

enter image description here

My code:

\begin{figure}[ht]
        \centering
        \subfigure[Interface of Grasshopper]{\label{fig:a}\includegraphics[width=70mm]{Test2_5.jpg}}
        \subfigure[Interface of Rhino3D]{\label{fig:b}\includegraphics[width=70mm]{Test2_6.jpg}}
        \caption{Grasshopper and Rhino3D}
\end{figure}
0

You need to add a \hfill between the subfigures and the \centering is then not needed anymore.

\begin{figure}[ht]
    \subfigure[Interface of Grasshopper]{\label{fig:a}\includegraphics[width=70mm]{Test2_5.jpg}}%
    \hfill%
    \subfigure[Interface of Rhino3D]{\label{fig:b}\includegraphics[width=70mm]{Test2_6.jpg}}
    \caption{Grasshopper and Rhino3D}
\end{figure}

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.