Picture layout in latex, how to use space efficiently

Can latex put 3 pictures in one line

This blog is well written and solved my problem:

https://blog.csdn.net/qq_32791307/article/details/80715902

 

 

\begin{figure}  \centering

  \begin{minipage}[t]{.25\linewidth}
    \framebox{framed text}
    \caption{a figure}
  \end{minipage}
  \begin{minipage}[t]{.25\linewidth}
    \framebox{framed text}
    \caption{a figure}
  \end{minipage}
  \begin{minipage}[t]{.25\linewidth}
    \framebox{framed text}
    \caption{a figure}
  \end{minipage}
\end{figure}

 

The results are as follows:

 

Does not meet the requirements. The reason is that the location of \centering is wrong

Write it like this:

\begin{figure}
  \centering
  \begin{minipage}[t]{.25\linewidth}
    \framebox{framed text}
    \caption{a figure}
  \end{minipage}
  \begin{minipage}[t]{.25\linewidth}
    \framebox{framed text}
    \caption{a figure}
  \end{minipage}
  \begin{minipage}[t]{.25\linewidth}
    \framebox{framed text}
    \caption{a figure}
  \end{minipage}
\end{figure}

Is the result we want

 

 

\begin{figure}[htbp]
    \centering
    \includegraphics[width=.25\textwidth]{Pictures/Fig-face feature PCA results.png}
    \includegraphics[width=.25\textwidth]{Pictures/Fig-face feature PCA results.png}
    \includegraphics[width=.25\textwidth]{Pictures/Fig-face feature PCA results.png}
\end{figure}

There is no icon, does not meet the requirements

 

 

\begin{figure}[htbp]
	\centering
	\begin{minipage}[c]{0.05\textwidth} 
			\centering
			\includegraphics[width=0.25\textwidth]{Pictures/Fig-face feature PCA results.png} %0.5指图片宽度
			\caption{渐变1}
		\end{minipage}%
	\begin{minipage}[c]{0.05\textwidth}
			\centering
			\includegraphics[width=0.25\textwidth]{Pictures/Fig-face feature PCA results.png}
			\caption{渐变2}
		\end{minipage}
	\begin{minipage}[c]{0.05\textwidth}
			\centering
			\includegraphics[width=0.25\textwidth]{Pictures/Fig-face feature PCA results.png}
			\caption{渐变3}
		\end{minipage}
	\begin{minipage}[c]{0.05\textwidth}
			\centering
			\includegraphics[width=0.25\textwidth]{Pictures/Fig-face feature PCA results.png}
			\caption{渐变4}  
		\end{minipage}
\end{figure}

 

fulfil requirements

 

 

 

In summary, there are two options:

(1)includegraphics

(2)minipage

 

Guess you like

Origin blog.csdn.net/Hodors/article/details/115268017