– Start
import numpy as np
import matplotlib.pyplot as plt
# 显示中文标签
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
# 饼图
Z = np.array([0.3, 0.3, 0.3, 0.1])
plt.pie(Z, labels=['房贷', '日常开支', '孩子', '其他'])
plt.show()
– 更多参见:Matplotlib 精萃
– 声 明:转载请注明出处
– Last Updated on 2021-01-13
– Written by ShangBo on 2021-01-13
– End