반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- box-cox변환
- ecommerce data
- cltv
- E-Commerce
- 백분위 변환
- 베이지안론
- 데이터 시각화
- marketing insight
- ttest
- spearman
- 분위수 변환
- FWER
- error bar plot
- plot
- python error plot
- 고객가치분석
- Yeo-Johnsom 변환
- matplotlib
- python
- 다중검정
- data analysis
- lifetimevalue
- 시각화
- 빈도주의론
- python significance level
- 데이터 분석
- marketing
- Pearson
- 통계
- p value plot
Archives
- Today
- Total
Data 공부
[데이터 시각화] Python - Correlation Plot(sns.jointplot) 본문
Seaborn - JointPlot
jointplot은 두 변수 간의 상관 관계를 시각화하는 툴 중 하나입니다. seaborn 라이브러리의 jointplot 함수를 사용하여 만들 수 있습니다. 이 함수는 두 변수의 산점도, 히스토그램, 커널 밀도 추정치 등을 함께 보여줍니다.
Plot에 상관관계 계수 및 P_value를 동시에 표현할 수 있어 효과적입니다.
예제 코드)
import seaborn as sns
import matplotlib.pyplot as plt
import scipy.stats as st
g = sns.jointplot(x=a, y=b, kind='reg', color='royalblue')
r, p = st.pearsonr(a, b)
g.ax_joint.annotate(f'$r = {r:.3f}, p = {p: .3f}$',
xy=(0.6, 0.9), xycoords='axes fraction',
ha='left', va='center',
bbox={'boxstyle': 'round', 'fc': 'powderblue', 'ec': 'navy'})
g.ax_joint.scatter(a, b)
g.set_axis_labels(xlabel='a', ylabel='b', size=15)
plt.tight_layout()
plt.show()
예제 PLOT)
반응형
'Data 공부 > 데이터 시각화' 카테고리의 다른 글
[데이터 시각화] Python - Error bar plot 그리기 (significance level추가) (0) | 2023.06.16 |
---|---|
[데이터 시각화] Python - 방사형 그래프 (Radar Chart) 그리기 (0) | 2023.06.12 |
[데이터 시각화] Python - text를 포함한 Radial Guage Chart 차트 (0) | 2023.06.12 |
[데이터 시각화] Python - gradientbar(matplotlib) (0) | 2023.06.12 |
Comments