# Aligning 4 figures

I use amcs template. I would like to align 4 figures to same size so the first two will be in same row. However, there is a slight change in the starting position and sizes as well as caption locations. How can I fix it?

This is my code:

\usepackage{booktabs,makecell,tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{siunitx}
%\documentclass{article}
\usepackage{array,booktabs}

\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

\newcommand{\tvar}[2]{%
\mathrm{#1}_{\mathrm{#2}}%
}

\documentclass{amcs}
\begin{document}
\begin{figure}
\includegraphics [scale=0.6]{Figure5Graph1.png}
\caption{DS1: PKsd saklsajlslak lska dfkjlsdkfj fdgdffjdsl lkllk sdfsfdfs dsgsd}
\label{fig:DS1}
\end{figure}

\begin{figure}
\includegraphics [scale=0.6]{Figure6Graph2.png}
\caption{DS2: Ksd saklsajlslak lska dfkjlsdkfj fdgdffjdsl lkllk sdfsfdfs dsgsd}
\label{fig:DS2}
\end{figure}

\begin{figure}
\includegraphics [scale=0.6]{Figure7Graph3.png}
\caption{DS3: Ksd saklsajlslak lska dfkjlsdkfj fdgdffjdsl lkllk sdfsfdfs dsgsd}
\label{fig:DS3}
\end{figure}

\begin{figure}
\includegraphics [scale=0.6]{Figure8Graph4.png}
\caption{DS4: Ksd saklsajlslak lska dfkjlsdkfj fdgdffjdsl lkllk}
\label{fig:DS4}
\end{figure}
\begin{document}

• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – ebosi Nov 7 '16 at 11:28
• You could use the subfig package – DRi Nov 7 '16 at 11:33
• Thanks @DRi, can you please elaborate, what do I have to change in my code? – Avi Nov 7 '16 at 11:35
• Add \usepackage{subfig}in your preamble and read the package notice to know how tio use it. – DRi Nov 7 '16 at 11:37
• If you want to be sure, all the images are the same size, it is saver not to use scale=0.6 but to specify the with width e.g. width=.45\textwidth – user36296 Nov 7 '16 at 12:00

Add \usepackage{subfig} in your preamble and in your text, use something like:

\begin{figure}[htbp]
\centering

• My figure are in png format when I write the code, I get the following error: Package pdftex.def Error: File figures/Figure7Graph3.png' not found. ....6\textwidth]{figures/Figure7Graph3.png}} – Avi Nov 7 '16 at 12:36
• Do you compile with LaTeX or with pdfLaTeX, I suspect the former which uses .ps or .eps file while the later uses .png,.pdf. Did you include \usepackage{graphicx} in your preamble ? – DRi Nov 7 '16 at 12:41
• Of course when I wrote \includegraphics[width=0.45\linewidth]{figures/subfig_a} this meant that the figures are in a folder named figures. If this is not the case, if they are in the same folder as the .tex file, the you should use \includegraphics[width=0.45\linewidth]{subfig_a} and so on. – DRi Nov 7 '16 at 12:46