我想要使用自定义matplotlib式Python的Matplotlib自定义样式错误
但它不工作:
如此地:
http://matplotlib.org/users/style_sheets.html
我尝试以下:
import matplotlib.pyplot as plt
print plt.style.available
matplotlib.pyplot
工作正常。但它一直说风格没有定义。
>>> import matplotlib.pyplot as plt
>>> print plt.style.available
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'style'
什么是解决方案?
它是Mac OS X优胜美地,它以管理员身份安装在默认位置。
进入在'网站packages'您matplotlib文件夹,检查风格文件夹存在。 (这取决于您的操作系统和Python的安装位置) – hopla 2014-11-23 08:58:34
我查看了“matplotlib .__ file__”指向的目录,并且没有样式文件夹 – user3613886 2014-11-23 09:48:57