Multiple figures under a single caption. I have tried a code to put two images in a together under a same caption. The subfigures do not appear on the same line.
The code is :
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\blindtext \blindtext \blindtext
\begin{figure}
\centering
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/study.jpeg}
\rule{35em}{0.3pt}
\caption{the distribution of the nodes in the study site}
\label{fig:sensor3}
\end{subfigure}% <-- % added here
\hfill %% useful if width of each figure is less the .5\textwidth
\begin{subfigure}[b]{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/coord.jpeg}
\rule{35em}{0.3pt}
\caption{the coordinates of nodes according to the Swiss coordinate system}
\label{fig:tiger}
\end{subfigure}
\caption{The Grand St. Bernard wireless sensor network deployment} \label{fig:Sensor}
\FloatBarrier
\end{figure}
\end{document}
Problem occurred with the code:






\rule{\textwidth}{0.3pt}? – egreg Jan 4 at 22:30