반응형
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 |
Tags
- Java
- SQL
- PANDAS
- matplotlib
- Kotlin
- Google Excel
- Excel
- Tkinter
- string
- Github
- 파이썬
- Redshift
- Google Spreadsheet
- GIT
- array
- django
- dataframe
- c#
- hive
- Python
- gas
- list
- Apache
- numpy
- math
- Mac
- PostgreSQL
- google apps script
- PySpark
Archives
- Today
- Total
목록bar graph (1)
달나라 노트

matplotlib를 이용해서 막대그래프를 그려보겠습니다. 막대 그래프를 그리기 위해선 bar 또는 barh method를 사용하면 됩니다. bar method는 수직 막대 그래프를 그려주고 barh method는 수평 막대 그래프를 그려줍니다. import matplotlib.pyplot as plt list_x = ['2020', '2021', '2022'] list_y = [10, 17, 31] plt.bar(list_x, list_y) plt.show() 형식은 일반적인 선 그래프와 비슷합니다. bar method에 x축에 나타낼 값들과 y축에 나타낼 값들을 전달하면 됩니다. 이제 bar method에 적용할 수 있는 여러가지 option들을 알아봅시다. import matplotlib.pyplo..
Python/Python matplotlib
2022. 1. 14. 19:19