암호

암호

5개의 하위 그림(첫 번째 행에 3개, 두 번째 행에 2개)을 사용하고 싶습니다. 두 행 모두 중앙에 정렬해야 합니다. 하지만 두 번째 행에서 문제가 발생했습니다. 두 이미지는 양쪽 끝에 배치되지만 중앙에는 배치되지 않습니다. 처리할 방법이 있나요?

\begin{figure*}[!htb]
\centering
\subfloat[Original Depth Image]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure1}
}
\hfill
\subfloat[Plausibility Map]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure2}
}
\hfill
\subfloat [Depth Image of Guided Filter]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure3}
}
\vfill
\centering
\subfloat[Blending Map]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure4}}
\hfill
\centering
\subfloat[Blended Output Depth Image]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure5}}
\caption{Results for Combination1: Plausibility Method-2 and Blending}
\end{figure*}

여기에 이미지 설명을 입력하세요

답변1

\hfil그냥 및 으로 게임을 해보세요 \hfill.

\documentclass{scrartcl}
\usepackage[demo]{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure*}[!htb]
\centering
\subfloat[Original Depth Image]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure1}
}
\hfill
\subfloat[Plausibility Map]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure2}
}
\hfill
\subfloat [Depth Image of Guided Filter]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure3}
}
\vfill
\centering
\hfill\hfill\subfloat[Blending Map]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure4}}\hfill
\subfloat[Blended Output Depth Image]{
\includegraphics[width=.3\textwidth,height=4.0cm]{cat.png}
\label{fig:subfigure5}}\hfill\hfill\hfil
\caption{Results for Combination1: Plausibility Method-2 and Blending}
\end{figure*}
\end{document}

여기에 이미지 설명을 입력하세요

답변2

귀하의 예를 일부 변경했습니다.

  • 을 반복할 필요는 없으며 \centering한 번이면 충분합니다.
  • 그림 내에서 자동 분리에 의존하는 대신 명시적인 빈 줄을 사용했습니다.
  • %줄 끝의 주석 기호는 문서에서 원하지 않는 공백을 방지합니다.
  • 그림에서 일정한 간격을 유지하기 위해 a를 사용하여 \hspace{.05\textwidth}맨 아래 행에 공백을 생성했습니다.

암호

\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}

\begin{document}
\begin{figure*}[!htb]\centering
\subfloat[Original Depth Image]{%
\includegraphics[width=.3\textwidth,height=4.0cm]{example-image}%
\label{fig:subfigure1}%
}%
\hfill
\subfloat[Plausibility Map]{%
\includegraphics[width=.3\textwidth,height=4.0cm]{example-image}%
\label{fig:subfigure2}%
}
\hfill
\subfloat [Depth Image of Guided Filter]{%
\includegraphics[width=.3\textwidth,height=4.0cm]{example-image}%
\label{fig:subfigure3}%
}

\subfloat[Blending Map]{%
\includegraphics[width=.3\textwidth,height=4.0cm]{example-image}%
\label{fig:subfigure4}}%
\hspace{.05\textwidth}%
\subfloat[Blended Output Depth Image]{%
\includegraphics[width=.3\textwidth,height=4.0cm]{example-image}%
\label{fig:subfigure5}}%
\caption{Results for Combination1: Plausibility Method-2 and Blending}
\end{figure*}
\end{document}

결과

결과

관련 정보