## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Placing pgf figures side by side with independent captions Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
bomberb17
Posts: 2
Joined: Sun Feb 10, 2019 8:52 pm

### Placing pgf figures side by side with independent captions

Hello, I am trying to place two figures from .pgf file input side-by-side. I want them to have independent captions (so no subfigures). I have tried using the minipage way as follows:

\documentclass{article}\usepackage{pgf} \begin{document} Some words..\begin{figure}    \begin{minipage}[t]{0.5\linewidth}        \centering        \input{figure1.pgf}        \label{Figure1}        \caption{This is caption for Figure 1.}    \end{minipage}\end{figure}\begin{figure}    \begin{minipage}[t]{0.5\linewidth}        \centering        \input{figure2.pgf}        \label{Figure2}        \caption{This is caption for Figure 2.}    \end{minipage}\end{figure} \end{document}

But instead of getting them side by side, I get them one below the other... I have tried many different combinations and I can't find a way to make this work... pgf files are here https://a.uguu.se/DPFft8cqVVmz_code.7z if someone needs to test. Thank you

Johannes_B
Site Moderator
Posts: 3952
Joined: Thu Nov 01, 2012 4:08 pm
Put both of them inside the same figure environment.
Aside: Make sure to have the label after the caption.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

bomberb17
Posts: 2
Joined: Sun Feb 10, 2019 8:52 pm
That was it! Thank you so much!