728x90
데이터를 퍼센티이지로 비교해서 보고싶을 때 사용한다.
plt.pie(sorted_data,autopct='%.1f', #소수점 첫번째 자리까지
labels=sorted_data.index, #데이터 넣기
startangle=90, #시작하는 각도 90으로 설정하시면 12시부터 시작합니다.
wedgeprops={'width':0.7}) # 가운데 구멍 뚫어줍니다.
plt.legend() #밑에 부가적인 표 출력
plt.title('Generation ID PIE Chart') #차트 이름 출력
plt.show() #메모리글 삭제
'Python' 카테고리의 다른 글
Python파이썬 데이터 시각화 matplotlib subplot() (0) | 2022.11.28 |
---|---|
Python파이썬 데이터 시각화 matplotlib histogram(히스토그램) (0) | 2022.11.28 |
Python파이썬 matplotlib, seaborn을 이용한 데이터 시각화 countplot (0) | 2022.11.28 |
Python파이썬 Pandas의 dataframe 합치기 concat(),merge() (0) | 2022.11.25 |
파이썬Python pandas DataFrame 포함되는 문자 찾기 contains() (0) | 2022.11.25 |