한 줄에 4개의 숫자를 두 쌍으로 배치

한 줄에 4개의 숫자를 두 쌍으로 배치

현재 다음과 같은 것이 있습니다.

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

이 이미지는 gnuplot의 epslatex 플롯에서 가져온 것입니다. 그래서 내 코드는 다음과 같습니다

 \documentclass{article}
 \usepackage{subcaption}
 \begin{document}
 \begin{figure}[H]
 \hspace{-5.2em}
 \begin{subfigure}{.5\textwidth}
 \input{initialpolar1.tex}
  \label{fig:sub1}
 \end{subfigure}%
 \begin{subfigure}{.5\textwidth}
  \input{finalpolar1.tex}
 \label{fig:sub2}
 \end{subfigure}
 \caption{These two next to each other.}
 \label{fig9}
 \end{figure}

 \begin{figure}[H]
 \hspace{-5.2em}
 \begin{subfigure}{.5\textwidth}
 \input{initialpolar2.tex}
 \label{fig:sub1}
 \end{subfigure}%
 \begin{subfigure}{.5\textwidth}
 \input{finalpolar2.tex}
 \label{fig:sub2}
  \end{subfigure}
 \caption{And these two.}
 \label{fig9}
      \end{figure}
 \end{document}

맨 위 두 사진이 서로 옆에 있도록 하려면 어떻게 해야 합니까? (기본적으로 오른쪽 그래프의 왼쪽이 왼쪽의 색상 상자 레이블 번호에 닿도록). 그리고 맨 아래 두 사진. 그런 다음 두 쌍을 같은 선에 배치하지만 거리를 두고 분리되어 있습니까? 그러면 모든 것이 페이지 중앙에 집중됩니다. 즉, 나는 가고 싶다

AB

CD

에게

AB CD

내 이미지 주위에 fbox를 배치하면 다음과 같은 결과가 나타납니다.

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

이로 인해 내가 달성해야 하는 목표에 문제가 발생할 수 있나요?

답변1

이런 식으로 시도해 볼 수 있습니다.

 \documentclass[a4paper]{article}
 \usepackage{subfig} 

 \begin{document}

\begin{figure}
    \subfloat[A]{\label{fig1}\rule{2cm}{4cm}}
    \,
    \subfloat[B]{\label{fig2}\rule{2cm}{4cm}}
    \hfil
    \subfloat[C]{\label{fig3}\rule{2cm}{4cm}}
    \,
    \subfloat[D]{\label{fig4}\rule{2cm}{4cm}}

    \caption{Put caption here where \ref{fig1} \ldots; \ref{fig2} \ldots; \ref{fig3} \ldots; and \ref{fig4} \ldots}
\end{figure}
 \end{document}

이것이 스크린샷입니다.

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

관련 정보