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