하위 가져오기를 사용하여 서로 옆에 있는 하위 그림

하위 가져오기를 사용하여 서로 옆에 있는 하위 그림

두 개의 하위 그림을 나란히 표시하고 싶습니다(왼쪽 하나, 오른쪽 하나). 내 문제는 그들이 항상 서로 위에 표시된다는 것입니다. 또한 includeFigure 대신 하위 가져오기 기능을 사용하고 싶습니다. 불행히도 온라인에서 찾은 모든 예제는 includeFigure만 사용합니다.

나는 또한 scalebox를 시도했지만 작동하지 않았습니다. 플롯이 여전히 서로 옆에 배치되지 않았으며 원하지 않는 축 레이블의 크기도 조정되었습니다. 이미지는 서로 나란히 들어갈 수 있을 만큼 얇아야 합니다.

하위 가져오기를 사용하여 이 작업을 어떻게 수행할 수 있나요?

나는 다음 코드를 시도했습니다.

\documentclass{article}

\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{import}
\usepackage{pgfplots}

\begin{document}

\begin{figure}[ht]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\subimport*{plots/somePath/}{plot1.tex}
\caption{sub caption 1}
\end{subfigure}
\begin{subfigure}[b]{0.5\textwidth}
\subimport*{plots/somePath/}{plot2.tex}
\caption{sub caption 2}
\end{subfigure}
\caption{test.}
\end{figure}

\end{document}

이는 테스트를 위해 두 하위 플롯 모두에 사용할 수 있는 플롯의 tikz 코드입니다.

\begin{tikzpicture}
\begin{axis}[%
width=1.5in,
height=1in,
at={(0in,0in)},
scale only axis,
xmin=0,
xmax=5,
ymin=0,
ymax=10,
axis background/.style={fill=white}
]
\addplot [color=blue,solid,forget plot]
  table[row sep=crcr]{%
0   0\\
0.555555555555556   1.11111111111111\\
1.11111111111111    2.22222222222222\\
1.66666666666667    3.33333333333333\\
2.22222222222222    4.44444444444444\\
2.77777777777778    5.55555555555556\\
3.33333333333333    6.66666666666667\\
3.88888888888889    7.77777777777778\\
4.44444444444444    8.88888888888889\\
5   10\\
};
\end{axis}
\end{tikzpicture}

관련 정보