在“图形”环境中在两幅图像之间插入水平空间

在“图形”环境中在两幅图像之间插入水平空间

我想将三个图形并排放置,如下面的代码所示。但生成的图像中所有三个图形都挤得很近。我想在图像之间留出一些水平间隔。如何修改下面的代码来实现这一点?

\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}

相关内容