강의

멘토링

커뮤니티

Inflearn Community Q&A

mavv19821044's profile image
mavv19821044

asked

Getting started with Python data analysis using public data

[11/20] Visualizing with seaborn - Drawing line graphs and subplots with lineplot and relplot

catplot과 relplot의 차이

Written on

·

833

1

안녕하세요 강의 잘듣고 있습니다.

catplot과 relplot 둘다로 서브플롯을 그릴 수 있는데 혹시 2개의 차이가 있을까요? 

pandasnumpypython

Answer 3

1

mavv19821044님의 프로필 이미지
mavv19821044
Questioner

설명 감사합니다!

0

todaycode님의 프로필 이미지
todaycode
Instructor

감사합니다 :)

0

todaycode님의 프로필 이미지
todaycode
Instructor

안녕하세요.

좋은 질문을 주셨네요.

기본적으로 하나의 범주 변수 값에 따라 서브플롯을 생성하고자 할 때 FacetGrid라는 것을 seaborn 내부에서 사용합니다.

그래서 catplot과 relplot을 그리게 되면 로그에 FacetGrid 라는 문구가 찍힐거에요.

catplot과 relplot 은 FacetGrid 를 그려주는 역할을 하는데

catplot은 범주형 변수에 대한 서브플롯을 그려주고

relplot 은 수치형 변수에 대한 서브플롯을 그려줍니다.

아래 seaborn 의 튜토리얼에 해당 내용이 자세히 정리가 되어 있어요.

https://seaborn.pydata.org/tutorial.html

그래서 아래 이미지를 참고해 보시면 relplot은 내부에서 scatter, lineplot을 그려보실 수 있고

../_images/function_overview_8_0.png

catplot은 다음의 그래프를 그려보실 수 있습니다.

Categorical scatterplots:

Categorical distribution plots:

Categorical estimate plots:

데이터의 특징에 따라 그리는 그래프가 다른데 아래 링크도 함께 추천해요.

[Third Pillar Of Mapping Data To Visualizations: Usage | Qlik Blog](https://blog.qlik.com/third-pillar-of-mapping-data-to-visualizations-usage)

mavv19821044's profile image
mavv19821044

asked

Ask a question