导致iPython中出现错误的打印选项
我正在尝试一些展示的东西。但是,每当我尝试使用以下命令按建议设置样式选项时导致iPython中出现错误的打印选项,python,matplotlib,pandas,Python,Matplotlib,Pandas,我正在尝试一些展示的东西。但是,每当我尝试使用以下命令按建议设置样式选项时 pd.options.display.mpl_style = 'default' 我得到以下错误 In [6]: Traceback (most recent call last): File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper draw(ar
pd.options.display.mpl_style = 'default'
我得到以下错误
In [6]: Traceback (most recent call last):
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/figure.py", line 1079, in draw
func(*args)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2092, in draw
a.draw(renderer)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
draw(artist, renderer, *args, **kwargs)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/axis.py", line 1105, in draw
renderer)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/axis.py", line 1054, in _get_tick_bboxes
extent = tick.label1.get_window_extent(renderer)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/text.py", line 741, in get_window_extent
bbox, info, descent = self._get_layout(self._renderer)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/text.py", line 311, in _get_layout
ismath=False)
File "/Users/seanwhipple/py27/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py", line 166, in get_text_width_height_descent
six.text_type(s), family, size, weight, style)
TypeError: bad argument type for built-in operation
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
%config Application.verbose_crash=True
在处理测试代码时,我发现当我添加pd.options
行时会产生错误。有什么原因吗?我已经使用pip-upgrade
将numpy
、pandas
和matplotlib
更新到了它们的最新版本。这是一个相同的问题,因为由于rcparams验证中存在细微的疏忽,macOSX后端期望的unicode对象列表是一个字节字符串对象列表,于是事情就爆炸了
最简单的解决方法是使用macosx后端以外的任何其他后端。有一个补丁正在开发中(),但它已经变成了一个由其他微妙bug组成的泥潭
仍在试图确定是否需要在1.4.1上使用阻止程序。不确定到底是什么原因导致了错误,但最新版本的matplotlib添加了一个,它完成了pandas选项的许多功能。有关如何使用它的任何提示?感谢您的回答,你知道matplotlib的最新版本中有什么没有这个问题吗?1.3.1(即预六化)和1.4.1当in出来时(“很快”,我认为这是一个拦截器)。若你们是游戏玩家,那个么从这个分支()的源代码处编译就太棒了(我并没有要测试的mac)。