TransWikia.com

Putting two pgf images beside each other

TeX - LaTeX Asked on October 3, 2021

I have exported several images using matplotlib into .pgf files but I am having trouble organizing them together in my latex document. This is the best I can get:

begin{center}
begin{tabular}{cc}
 input{toy_gauss.pgf}
 &
 input{toy_gauss2.pgf}
end{tabular}
label{Fig:gauss}
end{center}

But this yields one image too big causing the other to be caught off:
enter image description here

Also I tried using figure env for this type of graphic and they throw errors so that’s why I am using tabular here. I really just want two pgf images beside each other. (maybe even having four images in a 2×2 formation but one step at a time.)

One Answer

Use one figure environ for both inputs -- https://latex.org/forum/viewtopic.php?t=32239

documentclass{article}
usepackage{pgf}

begin{document}

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

end{document}

Answered by js bibra on October 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP