I have a serious problem of placing my figures in appropriate place of the two column paper. I searched all the online tips/guidance for it and applied but not working. I try to put my figure' code in one place and sometime it goes after and even between the references. Am I missing some libraries, some basics etc ?
The following libraries I used and then the code for my figure
\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
% The preceding line is only needed to identify funding in the first footnote. If that is unneeded, please comment it out.
\usepackage{cite}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{multicol}%set multicolumn features in page
\usepackage{float}%Places the float at precisely the location in the LaTeX code
\usepackage[table,xcdraw]{xcolor}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}
Code for the figure 1
\begin{figure}[h] % I used with [h] and without [h] but doesnt help
\begin{center}
\includegraphics[width=8cm, height=6cm]{Picture4.png}
Figure 3: Some caption
\label{fig:my_label}
\end{center}
\end{figure}
\setlength{\parskip}{1em}
Code for the figure 2
\begin{figure}[]
\begin{center}
\includegraphics[width=8cm, height=6cm]{Picture5.png}
Figure 3: Some caption
\label{fig:my_label}
\end{center}
\end{figure}
\setlength{\parskip}{1em}
One of the two figures is shown inside the paper (though not the exact place I tried) and another between the references. Please guide me where am I doing wrong?
\usepackage{float}to the preamble and use\begin{fihure}[H]instead of\begin{fihure}[h]etc. This way, the figure will appear exactly in the order you code it. – Dr. Manuel Kuehner Nov 24 '22 at 21:35