饼图matplotlib“tuple”对象不是callab

2024-06-08 05:25:05 发布

您现在位置:Python中文网/ 问答频道 /正文

import matplotlib.pyplot as plt
labels='bye_runs','legbye_runs','noball_runs','penalty_runs','batsman_runs','extra_runs'  
size=[680,3056,612,10,166009,9519]
plt.pie(size,labels=labels)
plt.show()

这是我的饼图代码,但它在第4行显示了typeerror

TypeError: 'tuple' object is not callable

抱歉问这么简单的问题。在


Tags: importsizelabelsmatplotlibasrunspltextra

热门问题