I am using subcaption package to plot subfloats in my report. However, the caption for subfigures are not centered. Here is what I have done:


    \psfrag{lambda}[][][1.5]{$\log_{10} (\lambda)$}
    \psfrag{N}[][][1.5]{Channel Noise Power, $N$}
    \psfrag{lambda}[][][1.5]{$\log_{10} (\lambda)$}
    \psfrag{Ps}[][][1.5]{Encoder transmit power, $\ps$}
    \caption{Achievable }

Am I missing something here? Can somebody help me out please?

  • 1
    your MWE doesn't compile- please fix it, and remove any unnecessary packages :) – cmhughes Aug 2 '12 at 0:37

Assuming you're using a "standard" paper size (either letterpaper or A4) and "normal" horizontal margins (ca. 1"), your document's \textwidth parameter will be equal to roughly 6" (15cm). You allocate an overall width to each subfigure environments of 0.33\textwidth, which works out to about 2" (5cm). Yet, via the \resizebox instructions, you specify a display width of 8cm for the included graphics. These parameters are not mutually consistent, and thus LaTeX can't perform the centering as requested.

To fix up the problem, you may try applying the following changes: (i) specify widths of each subfigure of 0.45\textwidth instead 0.33\textwidth, (ii) use \linewidth instead of 8cm as the first argument of the \resizebox instructions, and (iii) replace the instruction \hspace{2.5cm} with \hspace{\fill}.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.