我正在尝试按照教程在 matplotlib 中设置样式http://matplotlib.org/users/style_sheets.html http://matplotlib.org/users/style_sheets.html
import matplotlib.pyplot as plt
plt.style.use('ggplot')
但我得到的回报是:
AttributeError: 'module' object has no attribute 'style'
我的 matplotlib 版本是 1.1.1(我在运行 Mavericks 的 Mac 上)。这个版本的样式在哪里?
thanks!
在 ipython 笔记本中,我还必须包含 %matplotlib 内联,否则我仍然会得到相同的错误。
%matplotlib inline
import matplotlib
matplotlib.style.use('ggplot')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)