이러한 유형의 플롯(능선)을 만드는 것이 가능합니까?

이러한 유형의 플롯(능선)을 만드는 것이 가능합니까?

PGFPlots를 사용하여 이러한 유형의 플롯을 만드는 것이 가능한지 궁금합니다. 문서의 모든 플롯 유형을 살펴봤지만 이에 가까운 내용은 본 적이 없습니다. 누군가 제안이 있을까요?

Google에서는 이를 플롯이라고 합니다 ridgeline. 어쩌면 PGFPlots에 이것과 비슷한 것에 대한 또 다른 키워드가 있을까요?

능선

답변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}

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

관련 정보