0

I inserted four figures, one by one. And then I added one paragraph of content. But I find the paragraph between the figures - First two figures, then one paragraph, and then one figure. How can I keep the position of the figures in the right place?

enter image description here

My code is like this:

\documentclass{article}    
\usepackage{subfigure}    
\begin{document}    
\begin{figure}[hbtp]    
\centering    
\includegraphics[scale=1]{C:/Users/tr/Pictures/Experiment1.png}    
\caption{First Time Experiment}    
\end{figure}    
\begin{figure}[hbtp]    
\centering    
\includegraphics[scale=1]{C:/Users/tr/Pictures/Experiment2.png}    
\caption{Second Time Experiment}    
\end{figure}    
\begin{figure}[hbtp]    
\centering    
\includegraphics[scale=1]{C:/Users/tr/Pictures/Experiment3.png}    
\caption{Third Time Experiment}    
\end{figure}    
\begin{figure}[hbtp]    
\centering    
\includegraphics[scale=1]{C:/Users/tr/Pictures/Experiment4.png}    
\caption{Fourth Time Experiment}    
\end{figure}

As the figures do, the researcher observes the following principles: ajie%
As the figures do, the researcher observes the following principles: ajie%
As the figures do, the researcher observes the following principles: ajie%
As the figures do, the researcher observes the following principles: ajie\\%\
\end{document}
  • It did not say that clear how to avoid the "content" being in the position that is between the figures. – Yulong Zhang May 31 '15 at 04:09
  • 1
    On a different note, I'd suggest that you discontinue using the now obsolete subfigure package and use captions & subcaptions packages instead for customizing the figure & sub-figure captions, respectively. – Amar May 31 '15 at 04:47

2 Answers2

1

It's not clear to me if the four graphs should be stacked vertically, or if two will fit next to each other; the sketch you posted seems to suggest the latter.

If two figures can fit side-by-side, I suggest you use a single figure environment, with four minipage environments sized to contain one graph and one \caption instruction. Note that it's not necessary to load the subfigure package (which, anyway, has long been deprecated and shouldn't be used anymore).

enter image description here

\documentclass{article}    
\usepackage[demo]{graphicx}   % don't use "demo" option in real document   
\begin{document}    

\begin{figure}  
\begin{minipage}{0.45\textwidth} 
\includegraphics[width=\linewidth]{C:/Users/tr/Pictures/Experiment1.png}    
\caption{First Time Experiment}    
\end{minipage}    
\hspace{\fill}  %% no blank line before of after this instruction
\begin{minipage}{0.45\textwidth} 
\includegraphics[width=\linewidth]{C:/Users/tr/Pictures/Experiment2.png}    
\caption{Second Time Experiment}    
\end{minipage}    

\vspace{0.75cm}
\begin{minipage}{0.45\textwidth} 
\includegraphics[width=\linewidth]{C:/Users/tr/Pictures/Experiment3.png}    
\caption{Third Time Experiment}    
\end{minipage}    
\hspace{\fill} %% no blank line before of after this instruction
\begin{minipage}{0.45\textwidth} 
\includegraphics[width=\linewidth]{C:/Users/tr/Pictures/Experiment4.png}    
\caption{Fourth Time Experiment}    
\end{minipage}    

\end{figure}

As the figures do, the researcher observes the following principles: ajie%
As the figures do, the researcher observes the following principles: ajie%
As the figures do, the researcher observes the following principles: ajie%
As the figures do, the researcher observes the following principles: ajie\\%\

\end{document}

If, on the other hand, the four graphs need to be stacked vertically, and if the four graphs and their captions can all fit on a single page, I still suggest you use a single figure environment. Note that LaTeX will almost certainly place such a tall figure on a page by itself.

enter image description here

\documentclass{article}    
\usepackage[demo]{graphicx}    
\begin{document}    

\begin{figure}   
\centering

\includegraphics[scale = 1]{C:/Users/tr/Pictures/Experiment1.png}    
\caption{First Time Experiment}    

\vspace{0.75cm}
\includegraphics[scale = 1]{C:/Users/tr/Pictures/Experiment2.png}    
\caption{Second Time Experiment}    

\vspace{0.75cm}
\includegraphics[scale = 1]{C:/Users/tr/Pictures/Experiment3.png}    
\caption{Third Time Experiment}    

\vspace{0.75cm}
\includegraphics[scale = 1]{C:/Users/tr/Pictures/Experiment4.png}    
\caption{Fourth Time Experiment}    

\end{figure}

\end{document}
Mico
  • 506,678
0

Quick fix: Use h! option for 4th (and 5th, 6th, ...) figure environment.