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

matplotlib의 legend method를 이용하면 chart에 범례를 표시할 수 있습니다. import matplotlib.pyplot as plt labels = ['Cake', 'Chocolate', 'Candy', 'Macaroon', 'Waffle'] values = [20, 35, 10, 50, 20] plt.pie(values, labels=labels, colors=['skyblue', 'pink', 'grey', 'lightgreen', 'yellow']) plt.legend() plt.show() 위 코드에서처럼 legend method를 적어준 것 만으로도 범례가 표시되죠. 범례의 위치는 자동으로 적당한 위치에 나타나도록 결정됩니다. import matplotlib.pyplot ..
Python/Python matplotlib
2022. 1. 17. 23:42