latex绘制子图,并为子图添加

如下代码所示:
通过\subfigure绘制子图,\centering使图片居中,可以直接在子图中为为图片添加标注,如代码中的{\scriptsize{误差均值}},该命令表示在子图上面添加标注。有时需要同时在子图的左边也添加竖排标注,但是会出问题。因此我们需要改为按照子图的形式添加标注。


\begin{figure}[h]
	{\rotatebox{90}{\scriptsize{Arad}}}
	\centering
	\subfigure{
		%\scriptsize{Arad}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{误差均值}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{410nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{550nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_15_error.png}}
		\end{minipage}
		
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{620nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{690nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			{\scriptsize{  }}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
		%\begin{minipage}[t]{0.03\textwidth}
		%\centering
		%{\footnotesize \scriptsize{690nm}}
		%\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar.png}}
		%\end{minipage}
	}\vspace{-3mm}

	\rotatebox{90}{\scriptsize{HSCNN}}
	\centering
	\subfigure{
		%\scriptsize{HSCNN\_R}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{误差均值}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{410nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{550nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_15_error.png}}
		\end{minipage}
		
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{620nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{690nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}
	
	

	{\rotatebox{90}{\scriptsize{RPAN}}}
	\centering
	\subfigure{
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_15_error.png}}
		\end{minipage}
		
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}


	\rotatebox{90}{\scriptsize{myNet8}}
	\centering
	\subfigure{
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_15_error.png}}
		\end{minipage}
		
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}
	
	\caption{重建HSI与实际HSI之间的误差图} 
	\label{fig_hsi_G_R}
\end{figure}

排版出错的问题,如下:
latex绘制子图,并为子图添加_第1张图片
因为在添加上表的同时又添加了左标注,造成标注和colorbar串行,而除了第一行子图出错外其他的均正常显示。这个表明在我们绘制子图时,同一行子图的格斯要一致。我们可以以绘制子图的形式绘制上标注。如图下所示:



\begin{figure}[h]
	
	
	\centering
	\subfigure{
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{误差均值}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{410nm}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{550nm}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{620nm}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			{\scriptsize{690nm}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			{\scriptsize{  }}
		\end{minipage}
	}\vspace{-3mm}
	
	
	{\rotatebox{90}{\scriptsize{Arad}}}
	\centering
	\subfigure{
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_15_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_Arad_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}


	\rotatebox{90}{\scriptsize{HSCNN}}
	\centering
	\subfigure{
		%\scriptsize{HSCNN\_R}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{误差均值}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{410nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{550nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_15_error.png}}
		\end{minipage}
		
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{620nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			%{\footnotesize \scriptsize{690nm}}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_resblock_16_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}
	
	
	{\rotatebox{90}{\scriptsize{RPAN}}}
	\centering
	\subfigure{
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_15_error.png}}
		\end{minipage}
		
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_rpanblock_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}


	\rotatebox{90}{\scriptsize{myNet8}}
	\centering
	\subfigure{
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_1_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_15_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_22_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.16\textwidth}
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8_myNet_8_hsi8_29_error.png}}
		\end{minipage}
		\begin{minipage}[t]{0.031\textwidth}%添加colorbar
			\centering
			\raisebox{-0.15cm}{\includegraphics[width=1\textwidth]{figure/8error_picture/8error_colorbar_2.png}}
		\end{minipage}
	}\vspace{-3mm}
	\caption{重建HSI与实际HSI之间的误差图} 
	\label{fig_hsi_G_R}
\end{figure}

latex绘制子图,并为子图添加_第2张图片
如上所示,解决串行问题。
需要额外表明的是:在同一行的子图中,所有图的宽度之和大于行宽的时候,图片也会自动换行显示,因此在图片大小分配时也要额外注意。

你可能感兴趣的:(latex)