帮忙看看代码哪错了,会报错
fig.add_subplot(333) n=20 Z=np.ones(n) Z[-1]*=2 plt.pie(Z,explode=Z*0.05,colors=['%f' % (i/float(n)) for i in range(n)], labels=('%.2f' % (i / float(n)) for i in range(n))) plt.gca().set_aspect('equal') plt.xticks([]),plt.yticks([]) plt.show() TypeError: object of type 'generator' has no len()