인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

박태렬's profile image
박태렬

asked

Getting started with Python data analysis using public data

[6/15] Visualizing Univariate Numerical Variables - Using distplot

sns.distplot 에 선 추가하는 기능을 sns.displot 을 통해 하는 법이 있을까요?

Written on

·

283

0

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
 
안녕하세요, 교수님.
 
sns.distplot 사용하면 나중에 해당 plot 기능은 사라질거라고 displot 사용하라는 경고가 뜨는데요.
해당 경고는 교수님 "단 두 장의 문서로 데이터 분석과 시각화 뽀개기" 해당 강의 커뮤니티 답변을 통해 displot 으로 대체하는 법을 배웠습니다.
 
근데 displot 은 plt.axvline 이나 plt.axhline 기능과 연동되지 않는건가요?
 
plt.axvline(data["위도"].median(), linestyle="--", color="g") sns.displot(data=data, x="경도", kde=True, rug=False)
 
위 코드처럼 실행하면 수직선 그래프와 displot 그래프가 따로따로 그려져셔요ㅠㅠ
 
다른 방법이 있나해서 질문드립니다!
pandaspythonnumpy

Answer

This question is waiting for answers
Be the first to answer!
박태렬's profile image
박태렬

asked

Ask a question