python可视化之扇形图

 

 

# 导入matplotlib库
import matplotlib.pyplot as plt
import matplotlib as mp1

# 导入numpy库
import numpy as np


# 设置输出文字类型
mp1.rcParams['font.family'] = 'STFangsong'

# 设置标签
labels =["广州仓","中山仓","深圳仓","东莞仓"]

# 设置数据
fracs = [66666,55555,88888,99999]

# 画面积图
plt.pie(fracs,labels = labels,autopct = '%.0f%%')

# 可视化呈现
plt.show()
相关文章
相关标签/搜索