티스토리 뷰
histogram
- 빈도 분포를 표현하고자할 때, 히스토그램 그래프가 시각적으로 효과적임
- plt.hist
- x : 발생빈도가 있는 값
- bins : 가로축 구간의 개수
- bins vs. xticks
- density : yticks 를 퍼센트 비율료 표현 여부
- orientiation : vertical or horizontal
- histtype : 히스토그램 종류
- bar (default)
- barstacked
- step
- stepfilled
- cumulative : 누적 히스토그램 여부
x = [x for x in range(1, 11) if x%2==0]
x = x*2
plt.hist(x, edgecolor='black', width=0.5)
plt.yticks(np.linspace(0, 2, 3))
plt.show()
scatter (산점도)
- 두 데이터 집합의 상관관계를 확인할 때, 시각적으로 효율적임
- plt.scatter(x, y)
- size : 마커의 크기
- color : 마커의 색상. 데이터 길이와 같은 크기의 숫자 시퀀스/rgb/ Hex xode
- alpah : xnaudeh
- cmap : 컬러맵
colors = np.random.rand(50)
area = np.random.rand(50)*500
x = np.random.rand(50)
y = np.random.rand(50)
plt.scatter(x, y, sizes=area, c=colors, alpha=0.5)
plt.show()
imshow (이미지 그래프)
- 이미지 데이터 : 픽셀의 모음이 행과 열을 가진 2차원 데이터
- plt.imshow(2차원 픽셀 데이터)
from sklearn.datasets import load_digits
digits = load_digits()
x = digits.images[9]
plt.imshow(x)
plt.show()
'데이터 시각화' 카테고리의 다른 글
[seaborn 그래프 튜토리얼] 02. 기본/통계형 그래프 (relplot) (0) | 2023.12.28 |
---|---|
[seaborn 그래프 튜토리얼] 01. seaborn (특징, 옵션) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 06. 그래프 (pie) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 05. 그래프 (bar) (0) | 2023.12.28 |
[matplotlib 그래프 튜토리얼] 04. 그래프 (subplot, multi-line) (0) | 2023.12.28 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 실시간 데이터베이스
- django 개발일지
- 알파벳 카운팅
- pythonanywhere배포방법
- iOS 화면 안나옴
- ModelForm Form 차이
- CellForRowAt Not Called
- django 로그인접근
- 까만 화면
- Django
- django clean
- 웹 배포
- 테이블출력안됨
- iOS UITableView 출력안됨
- python 웹 배포
- django tag
- iOS 데이터베이스
- UITableViewController Not Working
- CellForRowAt 호출안됨
- django pythoneverywhere
- 장고 태그달기
- django 게시판
- pythonanywhere배포
- django 태그
- Firebase 데이터베이스 추천
- 장고 게시판
- Realtime Database
- 데이터베이스 추천
- iOS 검은 화면
- cleaned_data
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함