[Tex/LaTex] Image disappears in figure environment

floatsgraphics

I'm trying to include a figure and caption to show my data.

The image shows when I use \includegraphics{}, but disappears when I add \begin{figure}. I'm not getting any errors when compiling my report.
I am including my figure like this:

\documentclass[a4paper,12pt]{article}
\author{~Name~}
\date{~Date~}
\title{~Title~}
\usepackage{multicol}
\setlength{\columnsep}{0.9cm}
\bibliographystyle{ieeetr}
\usepackage{setspace}
\onehalfspacing
\usepackage{geometry}
\geometry{
a4paper,
total={210mm,297mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm
}
\usepackage{graphicx} 
\graphicspath{{images/}}
\usepackage{hyphenat}

\begin{document}
\maketitle

\begin{abstract}
~abstract~
\end{abstract}

\begin{multicols}{2}
\section{Introduction}
\nohyphens{~Intro & equations~}

\begin{figure}
\includegraphics[width=0.4\textwidth]{Fig1}
\caption{~caption~}
\end{figure}

\end{document}

Is there something I'm missing? The image is a .png file.

Best Answer

figure is a float. Floats are partially disabled inside the multicols environment. The only ones available are the starred versions e.g. figure*. However, these will be moved to the next page and occupy the full width of that page.

Related Question