1

I want to use two column environment to place 4 subfigures. But I am using Figure environment. What is the purpose of * in the following code and how can I mention different captions to four subfigures in the figure environment.

\begin{figure}
\includegraphics[width=0.45\textwidth]{Fig1.PNG}
\hspace{0.05\linewidth}
\includegraphics[width=0.45\textwidth]{Fig2.PNG}
\\[.5\baselineskip]
\includegraphics[width=0.45\textwidth]{Fig3.PNG}
\hspace{0.05\linewidth}
\includegraphics[width=0.45\textwidth]{Fig4.PNG}
\caption{Figures}
\end{figure}
schtandard
  • 14,892
jerry
  • 159
  • Sorry I Have modified code for figure environment – jerry Jun 12 '19 at 03:30
  • While you don't actually NEED the subfig or subcaption packages, they are much easier than doing everything yourself. OTOH, you can even use a tabular to add text between images. See https://tex.stackexchange.com/questions/331118/how-do-i-align-both-baseline-and-caption-in-a-horizontal-tikzpicture-subcaption – John Kormylo Jun 12 '19 at 03:36
  • Actually in subfigure environmnet spacing b/w subfigures is too broad. That is why I want to use Figure enviromnet. Is there any way to reduce spacing b/w subfigures in two column and subfigure environment – jerry Jun 12 '19 at 03:58
  • Subfigures are just minipages with captions. \caption adds spacing (\abovecaptionskip and \belowcaptionskip), but you can pack 0.5\textwidth subfigures cheek to cheek. – John Kormylo Jun 12 '19 at 15:53

1 Answers1

2

I am not sure what do you want. Something like this:

enter image description here

Code:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure}[htbp]
\centering
\subfloat[Caption of a]{\label{fig:a}\includegraphics[width=0.45\linewidth]{example-image-a}}\qquad
\subfloat[Caption of b]{\label{fig:b}\includegraphics[width=0.45\linewidth]{example-image-b}}\\
\subfloat[Caption of c]{\label{fig:c}\includegraphics[width=0.45\textwidth]{example-image-c}}\qquad%
\subfloat[Caption of a]{\label{fig:d}\includegraphics[width=0.45\textwidth]{example-image-a}}%
\caption{Caption of figure}
\label{fig:myfig}
\end{figure}
\end{document}
Ñako
  • 3,626
  • If I use figure environment rather than {figure*} can I exactly fix the location of the figure at the top or bottom of the page. Yes I want this. But what is the advantage of using figure environment? – jerry Jun 12 '19 at 08:27
  • @jerry, in a 2 columns latex document (either \twocolumn or the multicols environment) use \begin{figure*} to create figures that span the entire width of the page. \begin{figure} span only one column. Is this the answer to your comment question? I thought you were using a one column document. Please give us a compilable MWE – Ñako Jun 12 '19 at 08:50
  • No I am using 2 column environment. But the broblem with {figure*} is that it shifts figures to the next page even after using dblfloatfix package – jerry Jun 12 '19 at 09:16
  • Is there any environment or any package that fix this problem in two column environment? – jerry Jun 12 '19 at 09:18