2
我試圖在使用DF的圖中創建餅圖子圖。但是我所有的餅圖都不是實際的圓形圖,但是前兩個餅圖以橢圓形出現。請指導我如何製作所有尺寸和圓形相同的小區圖。 代碼,我使用下面在Python中創建圓形類型的餅圖子圖
fig = plt.figure()
ax1 = plt.subplot(131)
ax2 = plt.subplot(132)
ax3 = plt.subplot(133)
ax1 = test1_pie.plot(kind='pie',y=test1,ax =ax1)
plt.axis('equal')
ax2 = test2_pie.plot(kind='pie',y=test2,ax=ax2)
plt.axis('equal')
ax3 = test3_pie.plot(kind='pie',y=test3,ax=ax3)
plt.axis('equal')
嘗試用'pie'功能以及。還發佈一個完整的代碼來重現問題。 – Azad
@Azad,使用特定的繪圖類型標記可能會產生比實際幫助更多的噪音。作爲一個經驗法則,我只會添加你可以想象人們實際選擇的標籤。 – cel
@cel好的你是對的 – Azad