I have the following piece of code:
\documentclass{article}
\usepackage{subcaption,caption}
\usepackag{graphicx}
\begin{document}
\begin{figure}[hbt!]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[width = 0.75 \textwidth]{./fig1}
\subcaption{$\epsilon$-Greedy}
\end{subfigure}
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[width = 0.75 \textwidth]{./fig2}
\subcaption{UCB}
\end{subfigure}
\end{figure}
\end{document}
This is creating the following picture:
But I want it to look like following (with subcaptions)
The second picture was created using subfigure
package which is obsolete now and isn't allowing to put subcaption properly. Nevertheless, this is the code I used
\begin{figure}[hbt!]
\centering
\subfigure{
\includegraphics[width = 0.45 \textwidth]{./fig1}
}
\subfigure{
\includegraphics[width = 0.45 \textwidth]{./fig2}
}
\end{figure}
\hfill
after the first subfigure of your code using subcaption :\end{subfigure}\hfill\begin{subfigure}[b]{0.5\textwidth}
\end{subfigure}
is%
, not\hfill
.