[Tex/LaTex] Reducing margin as small as possible in subfigure


I use subfigure to implement subfigure and I use \hspace or \vspace. I want very small margin to maximize the size of subfigures but when I set \hspace{0cm} and \vspace{0cm}, there is still large enough margin left between 2 subfigures hence I can not maximize subfigure size. How to solve this problem? My code is like this :


\subfigure[11a's TX rate]{
\includegraphics[scale =0.25] {fig/cdf_rate11a.eps}
\subfigure[11n's TX rate]{
\includegraphics[scale =0.25] {fig/cdf_rate11n.eps}

\caption{Coverage comparison in various location}

Best Answer

If I understand your objective correctly, you're looking to place two subfigures side by side. In order to maximize their size, while also maximizing the available distance between them, don't specify a scale option in the \includegraphics instructions. Instead, specify a large value for the width of each subfigure environment -- e.g., 0.48\textwidth -- and use the width=\linewidth option when executing \includegraphics. And, be sure to use an instruction such as \hspace{\fill} to maximize the separation between the subfigures.

The following image shows the resulting look. The thin horizontal line on top is drawn just to illustrate the width of the text block.

enter image description here

\usepackage{subcaption}      % for 'subfigure'  environment
\usepackage[demo]{graphicx}  % omit 'demo' in your real document
\hrule % just to illustrate the width of the text block
%%\centering  % not needed as the subfigures are maximally separated

\caption{11a's TX rate}
\caption{11n's TX rate}

\caption{Coverage comparison in various locations}
Related Question