Bar plot
- category에 따른 값을 비교하기에 적절
- .bar , .barh(그래프를 옆으로 눕힘)
Stacked Bar plot
- 각 그룹을 쌓아서 표현
- 모든 그룹의 순서는 일정해야 함
- 전체에서 비율을 나타내는 percentage stacked bar chart
Overlapped Bar plot
- 각 그룹을 겹쳐서 표현
- 3개 이상에서는 어려움 - area plot 사용
- 투명도를 조절하는 alpha
Grouped Bar plot
- 각 그룹을 이웃되게 표현
- 구현이 까다로움(set_xticks, set_xticklabels)
- 그룹이 많을 경우 예외 처리
Principle of Proportion ink
- 실제 값과 표현되는 잉크 양은 비례해야 함
- x축의 시작은 zero
Data sorting
- 시계열 - 시간 순
- 수치형 - 크기 순
- 순서형 - 범주 순
- 명목형 - 값 순
공간 활용
- x,y axis limit - set_xlim(), set_ylim()
- spines - spines[spine], set_visible()
- gap - width
- legend - legend()
- margins - margins()
Simplicity & Complexity
- 3d는 지양할 것
- 보이고 싶은 것을 확실히 정할 것
ETC
- errorbar - Uncertainty 추가
- bar - histogram
- 다양한 text 활용(title, label)
- shaery = True (subplot이 같은 y축을 사용)
'부스트캠프 AI Tech > Data visualization' 카테고리의 다른 글
Text (0) | 2022.02.03 |
---|---|
Scatter plot (0) | 2022.02.03 |
Line plot (0) | 2022.02.03 |
Matplotlib (0) | 2022.02.03 |
Data visualization (0) | 2022.02.03 |