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
- R
- matplotlib
- Python
- 실기
- 오라클
- level 1
- 빅데이터 분석 기사
- Oracel
- 머신러닝
- pandas
- 실습
- 파이썬
- level 2
- 튜닝
- Numpy
- 데이터 분석
- 카카오
- python3
- 코딩테스트
- 빅분기
- Kaggle
- SQL
- seaborn
- 프로그래머스
- sklearn
- oracle
- 알고리즘
Archives
- Today
- Total
라일락 꽃이 피는 날
[Matplotlib] 스타일 설정 본문
728x90
1. 타이틀
plt.title('이것은 타이틀 입니다')
plt.title('이것은 타이틀 입니다', fontsize=20)
2. X, Y축 Label 설정
plt.xlabel('X축', fontsize=20)
plt.ylabel('Y축', fontsize=20)
3. X, Y 축 Tick 설정 (rotation)
plt.xticks(rotation=90)
plt.yticks(rotation=30)
4. 범례(Legend) 설정
plt.legend(['10 * 2', '10 ** 2', 'log'], fontsize=15)
5. X와 Y의 한계점(Limit) 설정
plt.xlim(0, 5)
plt.ylim(0.5, 10)
6. 스타일 세부 설정
1) marker
. | point marker | s | square marker |
, | pixel marker | p | pentagon marker |
o | circle marker | * | star marker |
v | triangle_down marker | h | hexagon1 marker |
^ | triangle_up marker | H | hexagon2 marker |
< | triangle_left marker | + | plus marker |
> | triangle_right marker | x | x marker |
1 | tri_down marker | D | diamond marker |
2 | tri_up marker | d | thin_diamond marker |
3 | tri_left marker | | | vline marker |
4 | tri_right marker | _ | hline marker |
2) line
- | solid line style | -. | dash-dot line style |
-- | dashed line style | : | dotted line style |
3) color
b | blue | m | magenta |
g | green | y | yellow |
r | red | k | black |
c | cyan | w | white |
4) 투명도(alpha)
7. 그리드 설정
plt.grid()
8. 이미지 저장
plt.savefig('my_graph.png', dpi=300)
728x90
'데이터 분석 > Python' 카테고리의 다른 글
[Matplotlib] 다양한 그래프 그리기 2 (0) | 2021.05.11 |
---|---|
[Matplotlib] 다양한 그래프 그리기 1 (0) | 2021.05.11 |
[Matplotlib] 기본 그래프 그리기 (0) | 2021.05.08 |
[Matplotlib] colab 한글 깨짐 현상 해결 방법 (0) | 2021.05.08 |
[Numpy] random (0) | 2021.04.27 |