matplotlib 기본 문법
1. 기본적인 그래프
첫번째 줄은 주피터 노트북 안에 차트가 그려지도록 하는 문장입니다. 가장 간단하게 직접 좌표 찍어서 그리는 방식!
2. 데이터, 축 이름, 범례 추가
여기에 다양한 세부 내용들을 추가할 수 있습니다.
3. 막대 차트 그리기
꺾은 선 그래프 외에 bar chart도 그릴 수 있습니다.
4. 다양한 차트 스타일
그 외에도 차트는 스타일을 다양하게 변경할 수 있습니다.
* marker : https://matplotlib.org/3.1.1/api/markers_api.html
* color name : https://matplotlib.org/3.1.1/gallery/color/named_colors.html#sphx-glr-gallery-color-named-colors-py
* 더 다양한 양식들은 아래 홈페이지에서 확인 가능합니다.
https://matplotlib.org/3.1.1/gallery/index.html#color-examples
Gallery — Matplotlib 3.1.2 documentation
Gallery This gallery contains examples of the many things you can do with Matplotlib. Click on any image to see the full image and source code. For longer tutorials, see our tutorials page. You can also find external resources and a FAQ in our user guide.
matplotlib.org
1. 판다스로 불러온 후, seaborn 불러오기
2. 데이터 불러오고, 차트 작성
범주와 사이즈 조절 넣기도 가능합니다. Categorical Scatter Plot 작성예시입니다.
3. 박스 그림상자(Box plot)
* 더 많은 차트는 아래 사이트에서 확인 가능합니다.
https://seaborn.pydata.org/index.html
seaborn: statistical data visualization — seaborn 0.10.1 documentation
Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics. For a brief introduction to the ideas behind the library, you can read the introductory note
seaborn.pydata.org
'Computer Science > Jupyter notebook' 카테고리의 다른 글
파이썬 기본편 #2 List(시퀀스) (0) | 2024.09.22 |
---|---|
파이썬 기본편 #1 (2) | 2024.09.22 |
맨날 까먹어서 적는 파이썬 기본 문법 (0) | 2020.12.23 |
Pandas로 cvs 파일 편집하기 with Feature Engineering (0) | 2020.06.16 |
Jupyter Notebook 입문하기 (0) | 2020.06.13 |