我正在使用matplotlib进行绘图,并试图获得一个像plotly一样的漂亮布局。特别是我想要一个带有填充和轮廓的条形图/箱形图,颜色相同。不是默认的黑色/灰色轮廓和彩色轮廓,而是像plotly。没有样式表的任何建议?
以下解决了:
因为通过搜索解决方案,我找到了样式表,但是我收到以下错误消息,尝试在官方manual之后加载python matplotlib中的特定样式表:
>>> import matplotlib.pyplot as plt
>>> plt.style.use('ggplot')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'style'
同样的问题:
>>> print plt.style.available
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'style'
有关系统的信息:
>>> matplotlib.__version__
'1.3.1'
所以我的安装似乎有问题,但我该怎么办?有什么建议吗?