[Tex/LaTex] How to format multiple figures in one column in two-columns article

subfloatstwo-column

I am writing a two-columns latex file based on an aip templates. Now I have 6 figures, and I want to arrange them in a 3*2 format in one column. Here is an example I desired
desired output
I've tried subfigure, but it will expand the two figures in each row to the whole
width of the page.
Any suggestions?

I've tried the following codes

\begin{figure}
\centering
\begin{subfigure}{0.45\columnwidth}
    \includegraphics[width=\textwidth]{example_imagA}
    \caption{Image A}
\end{subfigure}
\hfill
\begin{subfigure}{0.45\columnwidth}
    \includegraphics[width=\textwidth]{example_imagB}
    \caption{Image B} 
\end{subfigure} 
% 
\begin{subfigure}{0.45\columnwidth} 
    \includegraphics[width=\textwidth]{example_imagC} 
    \caption{Image C} 
\end{subfigure}  
\hfill 
\begin{subfigure}{0.45\columnwidth} 
    \includegraphics[width=\textwidth]{example_imagD} 
    \caption{Image D} 
\end{subfigure} 
\end{figure}

and I get the results as follows
enter image description here
as you can see, the subfigures are very small. How to make full use of the single column width?

Best Answer

Use \columnwidth when specifying how wide you want the figure to be, and \textwidth for how wide you want your images to be within that subfigure. So \columnwidth tells you you much of the width of the column you wish your figure to take up (say .45), and then within the subfigure, you want your image to take up the whole of the width of the subfigure. This is measured by any of \textwidth, \linewidth, \columnwidth, or \hsize. So the width can be set by say width=\textwidth. Using the package subcaption (not subfigure), the following should give you the output you need:

  \documentclass[twocolumn]{article}

  \usepackage{subcaption}
  \usepackage{graphicx}
  \usepackage{lipsum}

  \begin{document}
  \lipsum
  \begin{figure}
  \begin{subfigure}{0.45\columnwidth}
  \includegraphics[width=\textwidth]{example-image-a}
  \caption{Image A}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.45\columnwidth}
  \includegraphics[width=\textwidth]{example-image-b}
  \caption{Image B} 
  \end{subfigure} 
  % 
  \begin{subfigure}{0.45\columnwidth} 
  \includegraphics[width=\textwidth]{example-image-c} 
  \caption{Image C} 
  \end{subfigure}  
  \hfill 
  \begin{subfigure}{0.45\columnwidth} 
  \includegraphics[width=\textwidth]{example-image-a} 
  \caption{Image A again} 
  \end{subfigure}
  \caption{Wow! Look at all those letters!}
  \end{figure}
  \lipsum
  \end{document}

This should give output similar to:

Example of a 2 by 2 grid of images in one column of a 2 column document