各位板友大家好,
小弟最近在學習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跑出的圓餅圖的「東部.西部..」等文字並未正常顯示,
想請問板上先進這是為什麼呢? 謝謝大家。