正如标题已经说明我得到一个TypeError
调用下面的方法时:馅饼()得到了一个意想不到的关键字参数“由startAngle”
plt.pie(ylist, labels=xlist, autopct='%1.1f%%', startangle=90, counterclock=False)
>>> TypeError: pie() got an unexpected keyword argument 'startangle'
当我离开了startangle
我得到一个TypeError
为counterclock
:
plt.pie(ylist, labels=xlist, autopct='%1.1f%%', counterclock=False)
>>> TypeError: pie() got an unexpected keyword argument 'counterclock'
当我也离开counterclock
它工作正常,我得到所需的情节。
但是根据documentation这两个关键字实际存在的,我也检查了我的python-matplotlib库的版本,以达到最新的(这是不可能的,该模块matplotlib.pyplot是OUT- date matplotlib是最新的,是吗?)。顺便说一句,我使用Python 2.7.3。
有人可以解释这个错误吗?
它是什么版本,具体是什么? – 2014-09-03 19:57:54
使用'dpkg -s python-matplotlib | grep'Version'我得到输出'Version:1.1.1〜rc1 + git20120423-0ubuntu1'。 – 2014-09-03 20:09:13
1.1.1甚至没有接近最新的。截至目前的最新版本是[1.4.0](http://matplotlib.org/contents.html)。 – 2014-09-03 20:12:04