import matplotlib.pyplot as plt
import matplotlib as mpl

# 支持中文
plt.rcParams['font.sans-serif'] = ['SimHei']  # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号

labels= ["1",'3','2',"4","5"]
data = [4000,50,500,3000,500]
plt.pie(data,labels = labels,autopct="%1.1f%%")
plt.show()

 

 

 

matplotlib 饼状图_matplotlib