-
카테고리
-
세부 분야
데이터 분석
-
해결 여부
미해결
catplot과 relplot의 차이
20.12.03 13:03 작성 조회수 601
1
안녕하세요 강의 잘듣고 있습니다.
catplot과 relplot 둘다로 서브플롯을 그릴 수 있는데 혹시 2개의 차이가 있을까요?
답변을 작성해보세요.
1
0
0
박조은
지식공유자2020.12.03
안녕하세요.
좋은 질문을 주셨네요.
기본적으로 하나의 범주 변수 값에 따라 서브플롯을 생성하고자 할 때 FacetGrid라는 것을 seaborn 내부에서 사용합니다.
그래서 catplot과 relplot을 그리게 되면 로그에 FacetGrid 라는 문구가 찍힐거에요.
catplot과 relplot 은 FacetGrid 를 그려주는 역할을 하는데
catplot은 범주형 변수에 대한 서브플롯을 그려주고
relplot 은 수치형 변수에 대한 서브플롯을 그려줍니다.
아래 seaborn 의 튜토리얼에 해당 내용이 자세히 정리가 되어 있어요.
https://seaborn.pydata.org/tutorial.html
그래서 아래 이미지를 참고해 보시면 relplot은 내부에서 scatter, lineplot을 그려보실 수 있고
catplot은 다음의 그래프를 그려보실 수 있습니다.
Categorical scatterplots:
-
stripplot()
(withkind="strip"
; the default) -
swarmplot()
(withkind="swarm"
)
Categorical distribution plots:
-
boxplot()
(withkind="box"
) -
violinplot()
(withkind="violin"
) -
boxenplot()
(withkind="boxen"
)
Categorical estimate plots:
-
pointplot()
(withkind="point"
) -
barplot()
(withkind="bar"
) -
countplot()
(withkind="count"
)
데이터의 특징에 따라 그리는 그래프가 다른데 아래 링크도 함께 추천해요.
[Third Pillar Of Mapping Data To Visualizations: Usage | Qlik Blog](https://blog.qlik.com/third-pillar-of-mapping-data-to-visualizations-usage)
답변 3