3

I am trying to make two figures adjacent in the same row but have no idea how to do this. I used following tex code but it adds only one figure in a row. Kindly help me. Thanks a lot for the help.

\begin{figure}
\begin{center}
\includegraphics[height= 2.5cm, width=8cm]{figA.eps}
\caption{}\label{}
\end{center}
\end{figure}
  • 1
    Please see this tex.stackexchange.com/q/132599/14103 – Masroor Jan 5 '16 at 3:47
  • Please complete your example so we can compile it. What needs to be added depends partly on the class and on any other relevant packages loaded. If you are using a standard class, you might want something like subcaption or floatrow. But if you just want two images in one figure, you can just add another \includegraphics. – cfr Jan 5 '16 at 3:47
  • Do you want what is called "sub figures"? Or do you just want two images next to one another. – Werner Jan 5 '16 at 3:51
  • @Werner I want two images next to one another. – monalisa Jan 5 '16 at 4:07
  • @monalisa: Just put the commands next to one another: \includegraphics[..]{...} \hspace{<len>} \includegraphics[..]{...} where you specify the distance <len> that should separate them. Of course, if your images are stretched to 8cm in width, then there's not much room left horizontally, if any. If that's the case, they'll wrap around since they can't fit within the text block. – Werner Jan 5 '16 at 4:38
4

I would use the following approach:

\begin{figure}
\includegraphics[width=0.475\textwidth]{figA.eps}
\hspace{\fill}
\includegraphics[width=0.475\textwidth]{figB.eps}
\caption{xyz}\label{fig:xyz}
\end{figure}

i.e., I would use relative rather than absolute widths for the graphs. With the parameters chosen above, 5% of the width of the textblock will be used as whitespace between graphs A and B; hopefully that'll be enough.

  • that's lovely....!! but how to reduce the size of figure as its taking too much of space on the page – monalisa Jan 5 '16 at 11:06
  • @monalisa - Please clarify what you mean by the figure "taking [up] too much of space". It does fit inside the width of the textblock, doesn't it? Or is it too tall for your taste? – Mico Jan 5 '16 at 12:43
  • I mean size of pic is too big. – monalisa Jan 7 '16 at 13:16
  • @monalisa - Please clarify what you mean by "too big" -- horizontally, vertically, or in both directions? – Mico Jan 7 '16 at 13:19
  • Oh sorry for so late reply. I meant vertically.... u may say height of pic – monalisa Jan 8 '16 at 12:34

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.