4

在安装所有必要的东西之后,我正在尝试让 matplotlib xkcd 函数工作。http://matplotlib.org/xkcd/examples/showcase/xkcd.html

每次我得到这个:

Traceback (most recent call last):
  File "graph.py", line 4, in <module>
    plt.xkcd()
AttributeError: 'module' object has no attribute 'xkcd'

(我将代码保存为graph.py)

有什么想法可能会出错吗?

4

1 回答 1

5

The xkcd module was added in matplotlib 1.3.1. You need to update your version to that to get the xkcd examples to work properly.

于 2013-11-01T13:28:18.657 回答