def myplo(data, PL):
for name in PL:
plt.plot(Points[0], c = Col[name], ls=":", marker= Shape[name], ms= MS[name], label = Players[0])
plt.legend(loc='upper left', bbox_to_anchor=(1,1))
plt.xticks(list(range(0,10)), Seasons, rotation= 'vertical')
plt.show()
词典和所有其他相关功能都已输入。但当我进去的时候 myplot(点)
出现以下错误
TypeError
Traceback (most recent call last) <ipython-input-215-e2827b75a02e> in <module>()
----> 1 myplo(Points)
TypeError: myplo() missing 1 required positional argument: 'PL'
stacktrace显示出哪里出了问题。你知道吗
当像您描述的那样以
myplot(Points)
的形式调用函数时,您只提供了两个必需参数中的一个。 您的函数被定义为def myplo(data, PL):
,因此名为PL
的参数没有接收任何数据,它是必需的!你知道吗相关问题 更多 >
编程相关推荐