2

I have tried this code below and got images on a document like image 2 (the colorful one). I want to place quite visible side by side images like picture 1 (black and white image) on top of the page in double-column format. how can i achieve this? anyone here to help?

 \begin{figure}%
\centering
\subfloat[]{{\includegraphics[width=3cm]{aq.PNG} }}%
\qquad
\subfloat[]{{\includegraphics[width=3cm]{aq.PNG} }}%
\caption{zzzzzzzzzzzzzzzzzzzzzz}%
\label{fig:example}%
 \end{figure}
 \begin{figure}%
\centering
\subfloat[]{{\includegraphics[width=3cm]{aq.PNG} }}%
\qquad
\subfloat[]{{\includegraphics[width=3cm]{aq.PNG} }}%
\caption{xxxxxxxxxxxxxxxxxxxxxxxxxxxx}%
\label{fig:example}%
 \end{figure}

enter image description here

I followed this Two figures side by side but its not working in my case as I am using 2 column format IEEE template

\documentclass{article}
\usepackage{lipsum}
\usepackage{mwe}

\begin{document}

\begin{figure} \centering \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=0.9\textwidth]{c.PNG} % first figure itself \caption{first figure} \end{minipage}\hfill \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=0.9\textwidth]{h.PNG} % second figure itself \caption{second figure} \end{minipage} \end{figure}

\end{document}

user12
  • 579
  • The colorful one was created as a subfloat, what you want is to place two figures using minipage as in this question and answers https://tex.stackexchange.com/questions/5769/two-figures-side-by-side – Luis Turcio May 25 '21 at 00:18
  • I already tried that one ..its not working .. as i am using two columns format.. thats why i asked – user12 May 25 '21 at 00:24
  • 2
    Could you provide a minimal working example that starts with \documentclass{} and end with \end{document} so everyone will be able to figure out exactly what’s going on – Luis Turcio May 25 '21 at 00:28
  • tried the exact same code.. i am working on IEEE two column tempalte.. and its not working on that particular template – user12 May 25 '21 at 00:34
  • 1
    Please consider Luis' last comment and provide code that can be compiled without modification. – Dr. Manuel Kuehner May 25 '21 at 01:30
  • \documentclass{article} \usepackage{lipsum} \usepackage{mwe}

    \begin{document}

    \begin{figure} \centering \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=0.9\textwidth]{cc.PNG} % first figure itself \caption{first figure} \end{minipage}\hfill \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=0.9\textwidth]{ac.PNG} % second figure itself \caption{second figure} \end{minipage} \end{figure} \end{document}

    – user12 May 25 '21 at 01:39
  • i pasted the code but the thing is i am trying this on ieee 2 column template where its not working .. and i cannot paste the two column template all code – user12 May 25 '21 at 01:40
  • 1
    Please don't put the code in the comments, update the question. Try to provide the information that is needed so that others are able to understand to problem without having to guessing a lot. – Dr. Manuel Kuehner May 25 '21 at 02:54
  • you can change your code to \documentclass{IEEEtran}. Even though it does not come with the TeXLive installation it's not hard to find the class. 2. I tried with IEEEtran and using \begin{figure*} seemed to have solved the problem neatly (as Zarko suggests in his answer).
  • – Elad Den May 25 '21 at 07:47