8000 MacOSX backend breaks after importing seaborn · Issue #282 · mwaskom/seaborn · GitHub
[go: up one dir, main page]

Skip to content
MacOSX backend breaks after importing seaborn #282
@xiaoweiz

Description

@xiaoweiz

Environment: OS X Mavericks
Anaconda python distribution (python 2.7.8)
IPython 2.2.0
Seaborn 0.4

In an ipython terminal or qtconsole, it works with running

In [1]: %matplotlib
Using matplotlib backend: MacOSX

In [2]: from pylab import *

In [3]: plot(range(5))
Out[3]: [<matplotlib.lines.Line2D at 0x10d73dd50>]

However, after importing seaborn, the macosx backend breaks

In [4]: import seaborn as sns

In [5]: plot(range(5))
Out[5]: [<matplotlib.lines.Line2D at 0x10c10eb90>]

In [6]: Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/figure.py", line 1079, in draw
    func(*args)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 2092, in draw
    a.draw(renderer)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axis.py", line 1105, in draw
    renderer)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axis.py", line 1054, in _get_tick_bboxes
    extent = tick.label1.get_window_extent(renderer)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/text.py", line 741, in get_window_extent
    bbox, info, descent = self._get_layout(self._renderer)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/text.py", line 311, in _get_layout
    ismath=False)
  File "/Users/zhangxiaowei/anaconda/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

Interestingly, using %matplotlib inline in an IPython notebook works fine. Also, using another backend such as "Qt4Agg" works fine in IPython terminal or qtconsole.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0