일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- GIT
- PySpark
- hive
- PANDAS
- Python
- list
- Excel
- Github
- Java
- Apache
- math
- google apps script
- PostgreSQL
- Redshift
- Google Excel
- Kotlin
- dataframe
- 파이썬
- string
- SQL
- Google Spreadsheet
- gas
- array
- matplotlib
- c#
- django
- Tkinter
- numpy
- Mac
- Today
- Total
목록pyplot (2)
달나라 노트

matplotlib에서 그래프를 그리는 방법은 아래 링크를 참고하면 됩니다. https://cosmosproject.tistory.com/341 이번에는 그린 그래프를 이미지 파일로 생성해볼건데 savefig method를 사용할 것입니다. import matplotlib.pyplot as plt list_x_values = [1, 2, 3, 4, 5] list_y_values = [10, 30, 15, 20, 5] plt.figure(linewidth=5) plt.plot(list_x_values, list_y_values, color='skyblue', marker='o', markerfacecolor='blue', markersize=12) plt.title('Test graph') plt.xlab..

Python의 matplotlib를 이용하면 Python에서 그래프를 그릴 수 있습니다. import matplotlib.pyplot as plt list_x = [1, 2, 3, 4, 5] list_y = [10, 30, 15, 20, 5] plt.plot(list_x, list_y, color='skyblue', marker='o', markerfacecolor='blue', markersize=12) plt.title('Test graph') plt.xlabel('date') plt.ylabel('amount') plt.show() plt.close() 위같은 코드를 작성하여 실행하면 아래 이미지와 같은 결과를 얻을 수 있습니다. 그래프를 그릴 수 있죠. 그러면 위 코드를 한번 해석해봅시다. imp..