楼主:
BIAO (超越自己)
2016-12-18 23:32:26各位板友大家好,
小弟最近在学习Python的使用,
其实书中的范例程式(圆饼图)如下:
import matplotlib.pyplot as plt
labels = ["东部", "南部", "北部", "中部"]
sizes = [5, 10, 20, 15]
colors = ["red", "green", "blue", "yellow"]
explode = (0, 0, 0.05, 0)
plt.pie(sizes,explode = explode,labels = labels,colors = colors,\
labeldistance = 1.1,autopct = "%3.1f%%",shadow = True,\
startangle = 90,pctdistance = 0.6)
plt.axis("equal")
plt.legend()
plt.show()
使用IDE为Spyder(Python 3.5)
但是实际在IPython Console跑出的圆饼图的“东部.西部..”等文字并未正常显示,
想请问板上先进这是为什么呢? 谢谢大家。