티스토리 뷰
replot
- relation plot
- 라인 그래프와 산점도 그래프를 모두 그릴 수 있는 방법
- 옵션
- hue : 지정된 컬럼값에 따라 그래프 색상이 구분됨
- col : 지정된 컬럼값에 따라 다중 그래프가 자동으로 생성됨
- ci : 신뢰구간 설정값
- N%의 신뢰구간
- 선그래프일 때에만 유효함 (when kind='line')
- 선그래프를 따라 반투명의 신뢰구간이 생김
- 설정 안하려면 None/False/0
- kind : 그래프 스타일
- line : 선 그래프
- scatter : 산점도 그래프 (기본값)
- palette : 색상 조합
선그래프 그리기
import seaborn as sns
sns.set(style='darkgrid')
plt.rc('font', size=15)
fmri = sns.load_dataset("fmri")
sns.relplot(x='timepoint', y='signal', kind='line', data=fmri, ci=50)
다중 선그래프 그리기
- col='time' : 컬럼 'time'의 값 (dinner, lunch) 각각에 대한 그래프가 생성됨
- hue='day' : 컬럼 'day'의 값에 따라 색상이 구분됨 (thur, fri, sat, sun)
sns.relplot(x='total_bill', y='tip', hue='day', col='time', kind='line', data=tips, palette='magma')
산점도 그래프 그리기
sns.relplot(x='total_bill', y='tip', hue='smoker', data=tips, palette='Reds')
산점도 다중 그래프 그리기 (col)
- col=time 으로 옵션을 설정하였으니, time 값 (dinner, lunch) 각각에 대한 그래프가 생성됨
- hue='day' : 컬럼 'day'의 값에 따라 색상이 구분됨 (thur, fri, sat, sun)
sns.relplot(x='total_bill', y='tip', hue='day', col='time', data=tips, palette='magma')
'데이터 시각화' 카테고리의 다른 글
[seaborn 그래프 튜토리얼] 04. 기본/통계형 그래프 (countplot, distplot, heatmap, catplot) (0) | 2023.12.29 |
---|---|
[seaborn 그래프 튜토리얼] 03. 기본/통계형 그래프 (lmplot) (0) | 2023.12.28 |
[seaborn 그래프 튜토리얼] 01. seaborn (특징, 옵션) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 07. 그래프 (hist, scatter, imshow) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 06. 그래프 (pie) (0) | 2023.12.28 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- CellForRowAt Not Called
- django tag
- ModelForm Form 차이
- iOS 검은 화면
- django 개발일지
- Realtime Database
- iOS 데이터베이스
- CellForRowAt 호출안됨
- Django
- 실시간 데이터베이스
- 알파벳 카운팅
- 까만 화면
- django 로그인접근
- django clean
- 장고 태그달기
- django 게시판
- iOS UITableView 출력안됨
- 데이터베이스 추천
- cleaned_data
- python 웹 배포
- pythonanywhere배포방법
- UITableViewController Not Working
- iOS 화면 안나옴
- Firebase 데이터베이스 추천
- 장고 게시판
- django pythoneverywhere
- pythonanywhere배포
- django 태그
- 웹 배포
- 테이블출력안됨
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함