%EC%9D%84%20%EB%A7%8C%EB%93%9C%EB%8A%94%20%EA%B2%83%EC%9D%B4%20%EA%B0%80%EB%8A%A5%ED%95%A9%EB%8B%88%EA%B9%8C%3F.png)
답변1
y축에 여러 플롯을 쌓으려면 옵션을 사용할 수 있습니다 stack plots = y
. 그러나 동일한 개수의 데이터로 구성된 그래프만 허용한다는 한계가 있습니다. 응답의 기반이 될 데이터세트를 제공해 주시면 더 나은 답변을 제공해 드릴 수 있습니다.
\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{xcolor}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{every axis plot post/.append style={draw=black, fill=gray!25}}
\begin{axis}[
smooth,
stack plots=y,
area style,
enlarge x limits=false,
xlabel=length (minutes),
ylabel=year,]
\addplot coordinates {(0,1) (1,1.5) (2,2) (3,2) (4,1.5) (5,1)} ;
\addplot coordinates {(0,1) (1,1) (2,2) (3,2) (4,1) (5,1)} ;
\addplot coordinates {(0,0.5) (0.5,1) (1,1.5) (1.5,1) (2,0)} ;
\end{axis}
\end{tikzpicture}
\end{document}