import matplotlib.pyplot as plt # 数据准备 nums = [25, 37, 33, 37, 6] labels = ['High-school','Bachelor','Master','Ph.d', 'Others'] # 用 Matplotlib 画饼图 plt.pie(x = nums, labels=labels) plt.show()
Matplotlib 效果: