Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOSX backend breaks for matplotlib 1.4 after importing seaborn #3470

Closed
xiaoweiz opened this issue Sep 5, 2014 · 25 comments
Closed

MacOSX backend breaks for matplotlib 1.4 after importing seaborn #3470

xiaoweiz opened this issue Sep 5, 2014 · 25 comments

Comments

@xiaoweiz
Copy link

xiaoweiz commented Sep 5, 2014

Reported also in mwaskom/seaborn#282

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

n [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.

After downgrading matplotlib to 1.3.1, the issue goes away.

@tacaswell tacaswell added this to the v1.4.x milestone Sep 5, 2014
@tacaswell tacaswell added the OSX label Sep 5, 2014
@tacaswell
Copy link
Member

cc @mdehoon

This might be related to #3334 and #3330

@tacaswell tacaswell modified the milestones: v1.4.1, v1.4.x Sep 8, 2014
@tacaswell
Copy link
Member

Quoting @mwaskom

Here is everything that gets changed when importing seaborn 0.4 on matplotlib 1.4:

import matplotlib
rc1 = matplotlib.rcParams.copy()
import seaborn
rc2 = matplotlib.rcParams.copy()

changed_params = {}
for k, v in rc2.iteritems():
    try:
        if v != rc1[k]:
            changed_params[k] = v
    except ValueError:
        if (v != rc1[k]).any():
            changed_params[k] = v

gives changed_params as

{u'axes.axisbelow': True,
 u'axes.color_cycle': [(0.2980392156862745,
   0.4470588235294118,
   0.6901960784313725),
  (0.3333333333333333, 0.6588235294117647, 0.40784313725490196),
  (0.7686274509803922, 0.3058823529411765, 0.3215686274509804),
  (0.5058823529411764, 0.4470588235294118, 0.6980392156862745),
  (0.8, 0.7254901960784313, 0.4549019607843137),
  (0.39215686274509803, 0.7098039215686275, 0.803921568627451)],
 u'axes.edgecolor': 'white',
 u'axes.facecolor': '#EAEAF2',
 u'axes.grid': True,
 u'axes.labelcolor': '.15',
 u'axes.labelsize': 11,
 u'axes.linewidth': 0,
 u'axes.titlesize': 12,
 u'figure.figsize': array([ 8. ,  5.5]),
 u'font.sans-serif': ['Arial',
  'Liberation Sans',
  'Bitstream Vera Sans',
  'sans-serif'],
 u'grid.color': 'white',
 u'grid.linestyle': '-',
 u'grid.linewidth': 1,
 u'image.cmap': 'Greys',
 u'legend.fontsize': 10,
 u'legend.frameon': False,
 u'legend.numpoints': 1,
 u'legend.scatterpoints': 1,
 u'lines.linewidth': 1.75,
 u'lines.markeredgewidth': 0,
 u'lines.markersize': 7,
 u'lines.solid_capstyle': 'round',
 u'patch.facecolor': (0.2980392156862745,
  0.4470588235294118,
  0.6901960784313725),
 u'patch.linewidth': 0.3,
 u'pdf.fonttype': 42,
 u'text.color': '.15',
 u'xtick.color': '.15',
 u'xtick.direction': 'out',
 u'xtick.labelsize': 10,
 u'xtick.major.pad': 7,
 u'xtick.major.size': 0,
 u'xtick.major.width': 1,
 u'xtick.minor.size': 0,
 u'ytick.color': '.15',
 u'ytick.direction': 'out',
 u'ytick.labelsize': 10,
 u'ytick.major.pad': 7,
 u'ytick.major.size': 0,
 u'ytick.major.width': 1,
 u'ytick.minor.size': 0}

@tacaswell
Copy link
Member

http://stackoverflow.com/questions/25865975/pylab-networkx-no-node-labels-displayed-after-update/25870916 has the same exception via plotting labels in networkx.

Hopefully the intersection of those two code-bases will help narrow this down.....

@olgabaranov
Copy link

the rcparams from the above linked problem are

RcParams({u'agg.path.chunksize': 0,
          u'animation.avconv_args': u'',
          u'animation.avconv_path': u'avconv',
          u'animation.bitrate': -1,
          u'animation.codec': u'mpeg4',
          u'animation.convert_args': u'',
          u'animation.convert_path': u'convert',
          u'animation.ffmpeg_args': u'',
          u'animation.ffmpeg_path': u'ffmpeg',
          u'animation.frame_format': u'png',
          u'animation.mencoder_args': u'',
          u'animation.mencoder_path': u'mencoder',
          u'animation.writer': u'ffmpeg',
          u'axes.axisbelow': False,
          u'axes.color_cycle': [u'b', u'g', u'r', u'c', u'm', u'y', u'k'],
          u'axes.edgecolor': u'k',
          u'axes.facecolor': u'w',
          u'axes.formatter.limits': [-7, 7],
          u'axes.formatter.use_locale': False,
          u'axes.formatter.use_mathtext': False,
          u'axes.formatter.useoffset': True,
          u'axes.grid': False,
          u'axes.grid.which': u'major',
          u'axes.hold': True,
          u'axes.labelcolor': u'k',
          u'axes.labelsize': u'medium',
          u'axes.labelweight': u'normal',
          u'axes.linewidth': 1.0,
          u'axes.titlesize': u'large',
          u'axes.titleweight': u'normal',
          u'axes.unicode_minus': True,
          u'axes.xmargin': 0,
          u'axes.ymargin': 0,
          u'axes3d.grid': True,
          u'backend': u'MacOSX',
          u'backend.qt4': u'PyQt4',
          u'backend.qt5': u'PyQt5',
          u'backend_fallback': True,
          u'contour.negative_linestyle': u'dashed',
          u'datapath': u'/usr/local/lib/python2.7/site-packages/matplotlib/mpl-data',
          u'docstring.hardcopy': False,
          u'examples.directory': u'',
          u'figure.autolayout': False,
          u'figure.dpi': 80,
          u'figure.edgecolor': u'w',
          u'figure.facecolor': u'0.75',
          u'figure.figsize': [8.0, 6.0],
          u'figure.frameon': True,
          u'figure.max_open_warning': 20,
          u'figure.subplot.bottom': 0.1,
          u'figure.subplot.hspace': 0.2,
          u'figure.subplot.left': 0.125,
          u'figure.subplot.right': 0.9,
          u'figure.subplot.top': 0.9,
          u'figure.subplot.wspace': 0.2,
          u'font.cursive': [u'Apple Chancery',
                            u'Textile',
                            u'Zapf Chancery',
                            u'Sand',
                            u'cursive'],
          u'font.family': u'sans-serif',
          u'font.fantasy': [u'Comic Sans MS',
                            u'Chicago',
                            u'Charcoal',
                            u'ImpactWestern',
                            u'fantasy'],
          u'font.monospace': [u'Bitstream Vera Sans Mono',
                              u'DejaVu Sans Mono',
                              u'Andale Mono',
                              u'Nimbus Mono L',
                              u'Courier New',
                              u'Courier',
                              u'Fixed',
                              u'Terminal',
                              u'monospace'],
          u'font.sans-serif': [u'Bitstream Vera Sans',
                               u'DejaVu Sans',
                               u'Lucida Grande',
                               u'Verdana',
                               u'Geneva',
                               u'Lucid',
                               u'Arial',
                               u'Helvetica',
                               u'Avant Garde',
                               u'sans-serif'],
          u'font.serif': [u'Bitstream Vera Serif',
                          u'DejaVu Serif',
                          u'New Century Schoolbook',
                          u'Century Schoolbook L',
                          u'Utopia',
                          u'ITC Bookman',
                          u'Bookman',
                          u'Nimbus Roman No9 L',
                          u'Times New Roman',
                          u'Times',
                          u'Palatino',
                          u'Charter',
                          u'serif'],
          u'font.size': 12,
          u'font.stretch': u'normal',
          u'font.style': u'normal',
          u'font.variant': u'normal',
          u'font.weight': u'normal',
          u'grid.alpha': 1.0,
          u'grid.color': u'k',
          u'grid.linestyle': u':',
          u'grid.linewidth': 0.5,
          u'image.aspect': u'equal',
          u'image.cmap': u'jet',
          u'image.interpolation': u'bilinear',
          u'image.lut': 256,
          u'image.origin': u'upper',
          u'image.resample': False,
          u'interactive': False,
          u'keymap.all_axes': u'a',
          u'keymap.back': [u'left', u'c', u'backspace'],
          u'keymap.forward': [u'right', u'v'],
          u'keymap.fullscreen': (u'f', u'ctrl+f'),
          u'keymap.grid': u'g',
          u'keymap.home': [u'h', u'r', u'home'],
          u'keymap.pan': u'p',
          u'keymap.quit': (u'ctrl+w', u'cmd+w'),
          u'keymap.save': (u's', u'ctrl+s'),
          u'keymap.xscale': [u'k', u'L'],
          u'keymap.yscale': u'l',
          u'keymap.zoom': u'o',
          u'legend.borderaxespad': 0.5,
          u'legend.borderpad': 0.4,
          u'legend.columnspacing': 2.0,
          u'legend.fancybox': False,
          u'legend.fontsize': u'large',
          u'legend.frameon': True,
          u'legend.handleheight': 0.7,
          u'legend.handlelength': 2.0,
          u'legend.handletextpad': 0.8,
          u'legend.isaxes': True,
          u'legend.labelspacing': 0.5,
          u'legend.loc': u'upper right',
          u'legend.markerscale': 1.0,
          u'legend.numpoints': 2,
          u'legend.scatterpoints': 3,
          u'legend.shadow': False,
          u'lines.antialiased': True,
          u'lines.color': u'b',
          u'lines.dash_capstyle': u'butt',
          u'lines.dash_joinstyle': u'round',
          u'lines.linestyle': u'-',
          u'lines.linewidth': 1.0,
          u'lines.marker': u'None',
          u'lines.markeredgewidth': 0.5,
          u'lines.markersize': 6,
          u'lines.solid_capstyle': u'projecting',
          u'lines.solid_joinstyle': u'round',
          u'mathtext.bf': u'serif:bold',
          u'mathtext.cal': u'cursive',
          u'mathtext.default': u'it',
          u'mathtext.fallback_to_cm': True,
          u'mathtext.fontset': u'cm',
          u'mathtext.it': u'serif:italic',
          u'mathtext.rm': u'serif',
          u'mathtext.sf': u'sans\\-serif',
          u'mathtext.tt': u'monospace',
          u'patch.antialiased': True,
          u'patch.edgecolor': u'k',
          u'patch.facecolor': u'b',
          u'patch.linewidth': 1.0,
          u'path.effects': [],
          u'path.simplify': True,
          u'path.simplify_threshold': 0.1111111111111111,
          u'path.sketch': None,
          u'path.snap': True,
          u'pdf.compression': 6,
          u'pdf.fonttype': 3,
          u'pdf.inheritcolor': False,
          u'pdf.use14corefonts': False,
          u'pgf.debug': False,
          u'pgf.preamble': [u''],
          u'pgf.rcfonts': True,
          u'pgf.texsystem': u'xelatex',
          u'plugins.directory': u'.matplotlib_plugins',
          u'polaraxes.grid': True,
          u'ps.distiller.res': 6000,
          u'ps.fonttype': 3,
          u'ps.papersize': u'letter',
          u'ps.useafm': False,
          u'ps.usedistiller': False,
          u'savefig.bbox': None,
          u'savefig.directory': u'~',
          u'savefig.dpi': 100,
          u'savefig.edgecolor': u'w',
          u'savefig.extension': u'png',
          u'savefig.facecolor': u'w',
          u'savefig.format': u'png',
          u'savefig.frameon': True,
          u'savefig.jpeg_quality': 95,
          u'savefig.orientation': u'portrait',
          u'savefig.pad_inches': 0.1,
          u'savefig.transparent': False,
          u'svg.embed_char_paths': True,
          u'svg.fonttype': u'path',
          u'svg.image_inline': True,
          u'svg.image_noscale': False,
          u'text.antialiased': True,
          u'text.color': u'k',
          u'text.dvipnghack': None,
          u'text.hinting': True,
          u'text.hinting_factor': 8,
          u'text.latex.preamble': [u''],
          u'text.latex.preview': False,
          u'text.latex.unicode': False,
          u'text.usetex': False,
          u'timezone': u'UTC',
          u'tk.pythoninspect': False,
          u'tk.window_focus': False,
          u'toolbar': u'toolbar2',
          u'verbose.fileo': u'sys.stdout',
          u'verbose.level': u'silent',
          u'webagg.open_in_browser': True,
          u'webagg.port': 8988,
          u'webagg.port_retries': 50,
          u'xtick.color': u'k',
          u'xtick.direction': u'in',
          u'xtick.labelsize': u'medium',
          u'xtick.major.pad': 4,
          u'xtick.major.size': 4,
          u'xtick.major.width': 0.5,
          u'xtick.minor.pad': 4,
          u'xtick.minor.size': 2,
          u'xtick.minor.width': 0.5,
          u'ytick.color': u'k',
          u'ytick.direction': u'in',
          u'ytick.labelsize': u'medium',
          u'ytick.major.pad': 4,
          u'ytick.major.size': 4,
          u'ytick.major.width': 0.5,
          u'ytick.minor.pad': 4,
          u'ytick.minor.size': 2,
          u'ytick.minor.width': 0.5})

(actively) imported packages are matplotlib (1.4), matplotlib.pyplot and networkx (1.9)

@mdehoon
Copy link
Contributor

mdehoon commented Sep 18, 2014

@xiaoweiz Can you check which of the arguments to get_text_width_height_descent is actually causing the problem? Just printing out the arguments and their type should give enough information.

@xiaoweiz
Copy link
Author

@mdehoon As a newbie, I'm not sure how this should done...

@mdehoon
Copy link
Contributor

mdehoon commented Sep 19, 2014

@xiaoweiz
In file
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py
just before line 165 (the call to get_text_width_height_descent), just add

        print(six.text_type(s))
        print(family)
        print(size)
        print(weight)
        print(style)

@xiaoweiz
Copy link
Author

@mdehoon The outputs are

lp
['sans-serif']
11.1111111111
normal
normal

@xiaoweiz
Copy link
Author

There is a minor change in the definition of the function get_text_width_height_descent from version 1.3.1 to 1.4.0

In the 1.3.1 version, line 158 of backend_macosx.py is

width, height, descent = self.gc.get_text_width_height_descent(unicode(s), family, size, weight, style)

whereas in 1.4.0 version, the first argument of the call is changed from unicode(s) to six.text_type(s)

However, changing the function call to the 1.3.1 version doesn't solve the original issue.

@mdehoon
Copy link
Contributor

mdehoon commented Sep 19, 2014

Thank you. The problem turns out to be in the 'family' argument.
Before importing seaborn, the call to prop.get_family():

        family =  prop.get_family()

in line 160 of lib/matplotlib/backends/backend_macosx.py returns a list of Unicode strings.
After importing seaborn, the call to prop.get_family() returns a list of plain strings.
The MacOSX backend expects to receive a list of Unicode strings, and chokes on the plain strings.

To avoid code duplication in the backends, I think the right solution is for prop.get_family() to always return a list of Unicode strings.
The get_family() method of the FontProperties class is in lib/matplotlib/font_manager.py.
The easiest way would be for self._family in this class to always store a list of Unicode strings.
Checking to see if self._family is None can then be done in the set_family method.

mdehoon referenced this issue Sep 19, 2014
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint

........
  r5028 | jdh2358 | 2008-04-03 11:24:20 -0400 (Thu, 03 Apr 2008) | 1 line
  
  some small fixes to excel tools
........
  r5032 | jrevans | 2008-04-07 18:26:21 -0400 (Mon, 07 Apr 2008) | 2 lines
  
  Fixed the double draw bug.
........
  r5033 | jdh2358 | 2008-04-09 14:54:54 -0400 (Wed, 09 Apr 2008) | 1 line
  
  small fix for vlines w/ len 1 args
........
  r5038 | mdboom | 2008-04-11 11:24:57 -0400 (Fri, 11 Apr 2008) | 3 lines
  
  Fixing global font rcParam setting after initialization time (thanks
  to Lev Givon and Eric Firing for finding this)
........

svn path=/trunk/matplotlib/; revision=5039
@tacaswell
Copy link
Member

I suspect that is a problem with the fact that rcparams is not unicode-ified yet...

The check should probably be done in validate_string.

@mdboom
Copy link
Member

mdboom commented Sep 19, 2014

👍 to @tacaswell's suggestion.

@tacaswell
Copy link
Member

@mwaskom On solution for this is to include a from __future__ import unicode_literals in rcmod.py which I think will fix the problem.

@tacaswell
Copy link
Member

ok, so the actual problem is that seaborn uses rcParams.update which due to an interesting wrinkle in the details of how dicts work, update does not use __setitem__(http://stackoverflow.com/a/2390997/380231) so none of the rcparams were being validated. I have that fixed, but now a bunch of other things from seaborn are broken.

I'll have a PR up before I go to bed, but it probably won't be done.

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Sep 25, 2014
Close matplotlib#3470

Over-ride `update` so that inputs are validated.
@pelson
Copy link
Member

pelson commented Oct 2, 2014

@tacaswell - it sounds like this might be a bug with seaborn (as well as us needing to fix the rcParam)? Is that the case? We should give heads up to the project if we are talking about being more strict with the RC params dictionary.

@tacaswell
Copy link
Member

The only thing that needed to be relaxed was to allow any thing with a length to be passed in for the *_nseq methods (see a298ab2).

We shouldn't be type on list and tuple like we were anyway.

@xiaoweiz
Copy link
Author

xiaoweiz commented Oct 5, 2014

I've just found a similar issue. In pandas, one can use pd.options.display.mpl_style = 'default' to get a sort of ggplot2 style. If one does so, then calling the plotting functions in pandas would generate the same error with OS X backend selected. E.g.,

In [1]: import pandas as pd

In [2]: import numpy as np

In [3]: ts = pd.Series(np.arange(10))

In [4]: pd.opt
pd.option_context  pd.options

In [4]: pd.options.display.mpl_style = 'default'

In [5]: ts.plot()
Out[5]: <matplotlib.axes._subplots.AxesSubplot at 0x1101f1ed0>

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

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

@tacaswell
Copy link
Member

@xiaoweiz Thanks for the report. Would it be possible to test if the fix in #3564 fixes your problem? (I think it should, but I don't actually have a mac to test on)

@FabienCesari
Copy link

Hi There,
I had the same issue than @xiaoweiz on os X 10.6, I tested the fix and it works . thank you!

@xiaoweiz
Copy link
Author

xiaoweiz commented Oct 6, 2014

@tacaswell There are various file changes in #3564 and I simply copied all the four files in https://github.com/matplotlib/matplotlib/pull/3564/files to override the current files in my Mac. It works!
However, there are a few test failures but I guess they're not related to this current issue.

@tacaswell
Copy link
Member

What failures? And why do you think they are unrelated?

Can you please post the details over in the pr thread?

@xiaoweiz
Copy link
Author

xiaoweiz commented Oct 6, 2014

I vaguely remember I run the test suite before I found out this current issue and had the same failure results. But my memory may be incorrect. Anyway, here is the test results.

IPython 2.3.0 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import matplotlib as mpl

In [2]: mpl.test()
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/cbook.py:133: MatplotlibDeprecationWarning: The matplotlib.delaunay module was deprecated in version 1.4. Use matplotlib.tri.Triangulation instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)
...KKKKKK./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/bezier.py:298: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  path_out = Path(concat([verts_right, path.vertices[i:]]),
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/bezier.py:299: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  concat([codes_right, path.codes[i:]]))
..K/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/hatch.py:209: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  vertices = np.empty((num_vertices, 2))
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/hatch.py:210: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  codes = np.empty((num_vertices,), np.uint8)
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/hatch.py:215: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  vertices_chunk = vertices[cursor:cursor + pattern.num_vertices]
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/hatch.py:216: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  codes_chunk = codes[cursor:cursor + pattern.num_vertices]
..K.....K....K..K..K..K..K..K..K............................K..K..K..K....K..K..K..K..K..K..K...K..K..K..K..K..K....K..K..K..K..K..K..K..K..K..K.....K.........K..K..K......K..K..K..K..K..K/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/cbook.py:1744: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  result = np.zeros(new_shape, a.dtype)
..K..K/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/projections/geo.py:489: RuntimeWarning: invalid value encountered in arcsin
  theta = np.arcsin(y / np.sqrt(2))
..K/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_axes.py:526: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  x[len(x)/2] = np.nan
..K...K........K..K..K..K..K..K..K..K..K..K....K..K..K..K..............K..K..K..K..K..K..K....K.....................................K..........................K..K...K...K..K..K......................K..K..K..K..K..K..K..K..K..K..K..K..K.................................../Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/colors.py:1534: RuntimeWarning: invalid value encountered in true_divide
  (intensity.max() - intensity.min())
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/colors.py:1542: RuntimeWarning: invalid value encountered in greater
  intensity > 0),
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/colors.py:1547: RuntimeWarning: invalid value encountered in greater
  hsv[:, :, 2] = np.where(intensity > 0,
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/colors.py:1553: RuntimeWarning: invalid value encountered in less
  intensity < 0),
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/colors.py:1557: RuntimeWarning: invalid value encountered in less
  hsv[:, :, 2] = np.where(intensity < 0,
......./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py:488: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  nlc.append(np.r_[lc[:I[0] + 1], xy1])
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py:490: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  nlc.append(np.r_[xy2, lc[I[1]:]])
..K./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py:484: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  nlc.append(np.r_[xy2, lc[I[1]:I[0] + 1], xy1])
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/text.py:52: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if rotation in ('horizontal', None):
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/text.py:54: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif rotation == 'vertical':
......................................................................................K..K..K...........K..K..K..K..K.K..K.K..K.K..............K..K..K..K..K..K..K..K..K...K..........................................................................................................................................................................................K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K........................................................................................../Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/mlab.py:3727: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif bw_method == 'scott':
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/mlab.py:3729: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif bw_method == 'silverman':
........./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_mlab.py:1331: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  t_specgram = x[t_start:t_stop:t_step]
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tri/triangulation.py:110: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  self._neighbors)
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/numpy/testing/utils.py:838: RuntimeWarning: invalid value encountered in less_equal
  return around(z, decimal) <= 10.0**(-decimal)
.K..K..K..K..K........K..K..K..K..................................................................K...K..K..K..K..K..K..K..K..K../Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_simplification.py:156: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  verts = verts.reshape((len(verts) / 2, 2))
....K..K..K..K..K/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/numpy/ma/core.py:783: RuntimeWarning: invalid value encountered in greater_equal
  return umath.absolute(a) * self.tolerance >= umath.absolute(b)
..K.......K./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py:1064: UserWarning: sharex argument to subplots() was an integer. Did you intend to use subplot() (without 's')?
  warnings.warn("sharex argument to subplots() was an integer."
......K..EFFK..K...........K..K..K..K..K/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/gridspec.py:302: UserWarning: This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect.
  warnings.warn("This figure includes Axes that are not "
..K..K..K.................K......../Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tri/trirefine.py:236: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  refi_x = np.zeros(refi_npts)
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tri/trirefine.py:237: DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  refi_y = np.zeros(refi_npts)
........./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tri/triangulation.py:212: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  self._cpp_triangulation.set_mask(self.mask)
............K..K./Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_pdf.py:2264: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  different = bool(ours != theirs)
.K..K..K..K..K..K..K..K..K..K..K
======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_text.test_font_styles'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/util.py", line 470, in try_run
    return func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 134, in setup_class
    cls._func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_text.py", line 45, in test_font_styles
    size=14,
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_text.py", line 21, in find_matplotlib_font
    path = findfont(prop, directory=data_path)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py", line 1418, in findfont
    font = fontManager.findfont(prop, **kw)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py", line 1258, in findfont
    os.path.commonprefix([font.fname, directory]) != directory):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/genericpath.py", line 71, in commonprefix
    s1 = min(m)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 15: ordinal not in range(128)

======================================================================
FAIL: matplotlib.tests.test_text.test_multiline.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_text/multiline.png vs. /Users/zhangxiaowei/Downloads/result_images/test_text/multiline-expected.png (RMS 27.663)

======================================================================
FAIL: matplotlib.tests.test_text.test_multiline.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_text/multiline_pdf.png vs. /Users/zhangxiaowei/Downloads/result_images/test_text/multiline-expected_pdf.png (RMS 35.875)

----------------------------------------------------------------------
Ran 4734 tests in 378.639s

FAILED (KNOWNFAIL=379, errors=1, failures=2)
/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/__init__.py:1287: UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
Out[2]: False

@xiaoweiz
Copy link
Author

xiaoweiz commented Oct 6, 2014

@tacaswell I reversed matplotlib back to 1.4.0 prior your patches, run the test suite again and got more errors and failures. Hmm...

======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_axes.test_pcolor_datetime_axis'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/util.py", line 470, in try_run
    return func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 134, in setup_class
    cls._func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_axes.py", line 730, in test_pcolor_datetime_axis
    plt.pcolor(x[:-1], y[:-1], z)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3012, in pcolor
    ret = ax.pcolor(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 4944, in pcolor
    collection = mcoll.PolyCollection(verts, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/collections.py", line 801, in __init__
    self.set_verts(verts, closed)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/collections.py", line 821, in set_verts
    self._paths.append(mpath.Path(xy, codes))
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/path.py", line 137, in __init__
    vertices = np.asarray(vertices, np.float_)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/numpy/core/numeric.py", line 462, in asarray
    return array(a, dtype, copy=False, order=order)
TypeError: float() argument must be a string or a number

======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_contour.test_contour_datetime_axis'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/util.py", line 470, in try_run
    return func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 134, in setup_class
    cls._func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_contour.py", line 212, in test_contour_datetime_axis
    plt.contour(x, y, z)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 2694, in contour
    ret = ax.contour(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 5318, in contour
    return mcontour.QuadContourSet(self, *args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py", line 1428, in __init__
    ContourSet.__init__(self, ax, *args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py", line 874, in __init__
    self._process_args(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py", line 1441, in _process_args
    x, y, z = self._contour_args(args, kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py", line 1505, in _contour_args
    x, y, z = self._check_xyz(args[:3], kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/contour.py", line 1534, in _check_xyz
    x = np.asarray(x, dtype=np.float64)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/numpy/core/numeric.py", line 462, in asarray
    return array(a, dtype, copy=False, order=order)
TypeError: float() argument must be a string or a number

======================================================================
ERROR: matplotlib.tests.test_contour.test_contour_manual_labels.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 186, in do_test
    self._tol, in_decorator=True)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/compare.py", line 326, in compare_images
    rms = calculate_rms(expectedImage, actualImage)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/compare.py", line 246, in calculate_rms
    abs_diff_image = abs(expectedImage - actualImage)
ValueError: operands could not be broadcast together with shapes (200,600,3) (600,800,3)

======================================================================
ERROR: matplotlib.tests.test_contour.test_contour_manual_labels.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 186, in do_test
    self._tol, in_decorator=True)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/compare.py", line 326, in compare_images
    rms = calculate_rms(expectedImage, actualImage)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/compare.py", line 246, in calculate_rms
    abs_diff_image = abs(expectedImage - actualImage)
ValueError: operands could not be broadcast together with shapes (144,432,3) (432,576,3)

======================================================================
ERROR: test suite for <class 'matplotlib.tests.test_text.test_font_styles'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/util.py", line 470, in try_run
    return func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 134, in setup_class
    cls._func()
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_text.py", line 45, in test_font_styles
    size=14,
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/tests/test_text.py", line 21, in find_matplotlib_font
    path = findfont(prop, directory=data_path)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py", line 1418, in findfont
    font = fontManager.findfont(prop, **kw)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py", line 1258, in findfont
    os.path.commonprefix([font.fname, directory]) != directory):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/genericpath.py", line 71, in commonprefix
    s1 = min(m)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 15: ordinal not in range(128)

======================================================================
FAIL: matplotlib.tests.test_axes.test_pcolormesh.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_axes/pcolormesh.png vs. /Users/zhangxiaowei/Downloads/result_images/test_axes/pcolormesh-expected.png (RMS 94.858)

======================================================================
FAIL: matplotlib.tests.test_axes.test_pcolormesh.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_axes/pcolormesh_pdf.png vs. /Users/zhangxiaowei/Downloads/result_images/test_axes/pcolormesh-expected_pdf.png (RMS 92.037)

======================================================================
FAIL: matplotlib.tests.test_dates.test_DateFormatter.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_dates/DateFormatter_fractionalSeconds.png vs. /Users/zhangxiaowei/Downloads/result_images/test_dates/DateFormatter_fractionalSeconds-expected.png (RMS 16.865)

======================================================================
FAIL: matplotlib.tests.test_text.test_multiline.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_text/multiline.png vs. /Users/zhangxiaowei/Downloads/result_images/test_text/multiline-expected.png (RMS 27.663)

======================================================================
FAIL: matplotlib.tests.test_text.test_multiline.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 51, in failer
    result = f(*args, **kwargs)
  File "/Users/zhangxiaowei/anaconda/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 196, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/zhangxiaowei/Downloads/result_images/test_text/multiline_pdf.png vs. /Users/zhangxiaowei/Downloads/result_images/test_text/multiline-expected_pdf.png (RMS 35.875)

----------------------------------------------------------------------
Ran 4684 tests in 410.483s

FAILED (KNOWNFAIL=379, errors=5, failures=5)

@tacaswell
Copy link
Member

@xiaoweiz I would try a clean installation (in a fresh env!) to run the test suite and then apply the patch and try again.

You can get a patch that can be applied to the code via https://github.com/matplotlib/matplotlib/pull/3564.patch

@jenshnielsen
Copy link
Member

This is resolved by #3564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants