![在“图形”环境中在两幅图像之间插入水平空间](https://linux22.com/image/422638/%E5%9C%A8%E2%80%9C%E5%9B%BE%E5%BD%A2%E2%80%9D%E7%8E%AF%E5%A2%83%E4%B8%AD%E5%9C%A8%E4%B8%A4%E5%B9%85%E5%9B%BE%E5%83%8F%E4%B9%8B%E9%97%B4%E6%8F%92%E5%85%A5%E6%B0%B4%E5%B9%B3%E7%A9%BA%E9%97%B4.png)
我想将三个图形并排放置,如下面的代码所示。但生成的图像中所有三个图形都挤得很近。我想在图像之间留出一些水平间隔。如何修改下面的代码来实现这一点?
\begin{figure}[ht]
\centering
\includegraphics[width=5cm]{./miscimages/1nng-example.png}
\includegraphics[width=5m]{./miscimages/2nng-example.png}
\includegraphics[width=5cm]{./miscimages/3nng-example.png}
\caption{\label{fig:knng} Generating some graphs}
\end{figure}
答案1
\begin{figure}[ht]
\centering
\includegraphics[width=5cm]{./miscimages/1nng-example.png}\hfill
\includegraphics[width=5mm]{./miscimages/2nng-example.png}\hfill
\includegraphics[width=5cm]{./miscimages/3nng-example.png}
\caption{\label{fig:knng} Generating some graphs}
\end{figure}
\begin{figure}[ht]
\centering
\includegraphics[width=5cm]{./miscimages/1nng-example.png}\hspace{4ex}
\includegraphics[width=5mm]{./miscimages/2nng-example.png}\hspace{4ex}
\includegraphics[width=5cm]{./miscimages/3nng-example.png}
\caption{\label{fig:knng} Generating some graphs}
\end{figure}