#3 Update to matplotlib 2.2.2
Merged 6 years ago by rathann. Opened 6 years ago by qulogic.
rpms/ qulogic/python-matplotlib mpl22  into  master

file modified
+3
@@ -20,3 +20,6 @@ 

  /matplotlib-2.1.1.tar.gz

  /matplotlib-2.1.2.tar.gz

  /matplotlib-2.1.2-with-freetype-2.8.tar.gz

+ /matplotlib-2.2.2.tar.gz

+ /matplotlib-2.2.2-with-freetype-2.8.tar.gz

+ /matplotlib-2.2.2-with-freetype-2.9.tar.gz

@@ -1,29 +0,0 @@ 

- From 77bae7e7ea5c02f5be0d59dabeae6c3c09571fbe Mon Sep 17 00:00:00 2001

- From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- Date: Wed, 24 Jan 2018 02:51:55 -0500

- Subject: [PATCH] Add libdl on Unix-like systems.

- 

- Not linking with libdl causes errors when -z defs is in the linker

- flags.

- 

- Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- ---

-  setupext.py | 2 ++

-  1 file changed, 2 insertions(+)

- 

- diff --git a/setupext.py b/setupext.py

- index d0f3f2070..6d2c3e296 100644

- --- a/setupext.py

- +++ b/setupext.py

- @@ -1493,6 +1493,8 @@ class BackendTkAgg(OptionalBackendPackage):

-          if sys.platform == 'win32':

-              # PSAPI library needed for finding Tcl / Tk at run time

-              ext.libraries.extend(['psapi'])

- +        elif sys.platform != 'darwin':

- +            ext.libraries.extend(['dl'])

-  

-  

-  class BackendGtk(OptionalBackendPackage):

- -- 

- 2.14.3

- 

@@ -0,0 +1,43 @@ 

+ From 46361ca058295e3f08d3c54196d990c497834306 Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Fri, 30 Mar 2018 03:15:51 -0400

+ Subject: [PATCH] Force using system qhull.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  setupext.py | 17 ++---------------

+  1 file changed, 2 insertions(+), 15 deletions(-)

+ 

+ diff --git a/setupext.py b/setupext.py

+ index d2ff239ad..30e0c9085 100644

+ --- a/setupext.py

+ +++ b/setupext.py

+ @@ -1318,23 +1318,10 @@ class Qhull(SetupPackage):

+  

+      def check(self):

+          self.__class__.found_external = True

+ -        try:

+ -            return self._check_for_pkg_config(

+ -                'libqhull', 'libqhull/qhull_a.h', min_version='2015.2')

+ -        except CheckFailed as e:

+ -            self.__class__.found_pkgconfig = False

+ -            self.__class__.found_external = False

+ -            return str(e) + ' Using local copy.'

+ +        return ' Using system copy.'

+  

+      def add_flags(self, ext):

+ -        if self.found_external:

+ -            pkg_config.setup_extension(ext, 'qhull',

+ -                                       default_libraries=['qhull'])

+ -        else:

+ -            ext.include_dirs.insert(0, 'extern')

+ -            ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c')))

+ -            if sysconfig.get_config_var('LIBM') == '-lm':

+ -                ext.libraries.extend('m')

+ +        ext.libraries.append('qhull')

+  

+  

+  class TTConv(SetupPackage):

+ -- 

+ 2.14.3

+ 

@@ -1,18 +1,19 @@ 

- From 69b627b84fa8081748d93d180deb2218b99270a4 Mon Sep 17 00:00:00 2001

+ From 47e4d5c14793503a7af7919a1fb7aaa04016c9e3 Mon Sep 17 00:00:00 2001

  From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  Date: Wed, 27 Sep 2017 19:35:59 -0400

- Subject: [PATCH 1/4] matplotlibrc path search fix

+ Subject: [PATCH 1/3] matplotlibrc path search fix

  

  Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  ---

-  lib/matplotlib/__init__.py | 5 ++++-

-  1 file changed, 4 insertions(+), 1 deletion(-)

+  lib/matplotlib/__init__.py            |  8 +++++---

+  lib/matplotlib/tests/test_rcparams.py | 23 ++++++++++++++++-------

+  2 files changed, 21 insertions(+), 10 deletions(-)

  

  diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py

- index 3ba486af1..b8caf27dc 100644

+ index 93397070f..98560d9db 100644

  --- a/lib/matplotlib/__init__.py

  +++ b/lib/matplotlib/__init__.py

- @@ -635,9 +635,12 @@ def _get_data_path():

+ @@ -739,9 +739,12 @@ def _get_data_path():

   

       _file = _decode_filesystem_path(__file__)

       path = os.sep.join([os.path.dirname(_file), 'mpl-data'])
@@ -25,7 +26,17 @@ 

       # setuptools' namespace_packages may highjack this init file

       # so need to try something known to be in matplotlib, not basemap

       import matplotlib.afm

- @@ -731,7 +734,7 @@ def matplotlib_fname():

+ @@ -822,8 +825,7 @@ def matplotlib_fname():

+  

+           - `$HOME/.matplotlib/matplotlibrc` if `$HOME` is defined.

+  

+ -    - Lastly, it looks in `$MATPLOTLIBDATA/matplotlibrc` for a

+ -      system-defined copy.

+ +    - Lastly, it looks in `/etc/matplotlibrc` for a system-defined copy.

+      """

+  

+      def gen_candidates():

+ @@ -836,7 +838,7 @@ def matplotlib_fname():

               yield matplotlibrc

               yield os.path.join(matplotlibrc, 'matplotlibrc')

           yield os.path.join(_get_configdir(), 'matplotlibrc')
@@ -33,7 +44,55 @@ 

  +        yield '/etc/matplotlibrc'

   

       for fname in gen_candidates():

-          if os.path.isfile(fname):

+          if os.path.exists(fname):

+ diff --git a/lib/matplotlib/tests/test_rcparams.py b/lib/matplotlib/tests/test_rcparams.py

+ index 4d93a9914..1d2097827 100644

+ --- a/lib/matplotlib/tests/test_rcparams.py

+ +++ b/lib/matplotlib/tests/test_rcparams.py

+ @@ -424,15 +424,25 @@ def test_rcparams_reset_after_fail():

+          assert mpl.rcParams['text.usetex'] is False

+  

+  

+ -def test_if_rctemplate_is_up_to_date():

+ +@pytest.fixture

+ +def mplrc():

+ +    # This is the Fedora-specific location ...

+ +    if 'MATPLOTLIBDATA' in os.environ:

+ +        # ... in buildroot.

+ +        return os.path.join(os.environ['MATPLOTLIBDATA'],

+ +                            '../../../../etc/matplotlibrc')

+ +    else:

+ +        # ... on installed systems.

+ +        return '/etc/matplotlibrc'

+ +

+ +

+ +def test_if_rctemplate_is_up_to_date(mplrc):

+      # This tests if the matplotlibrc.template file

+      # contains all valid rcParams.

+      dep1 = mpl._all_deprecated

+      dep2 = mpl._deprecated_set

+      deprecated = list(dep1.union(dep2))

+ -    #print(deprecated)

+ -    path_to_rc = mpl.matplotlib_fname()

+ -    with open(path_to_rc, "r") as f:

+ +    with open(mplrc, "r") as f:

+          rclines = f.readlines()

+      missing = {}

+      for k,v in mpl.defaultParams.items():

+ @@ -454,11 +464,10 @@ def test_if_rctemplate_is_up_to_date():

+                           .format(missing.items()))

+  

+  

+ -def test_if_rctemplate_would_be_valid(tmpdir):

+ +def test_if_rctemplate_would_be_valid(tmpdir, mplrc):

+      # This tests if the matplotlibrc.template file would result in a valid

+      # rc file if all lines are uncommented.

+ -    path_to_rc = mpl.matplotlib_fname()

+ -    with open(path_to_rc, "r") as f:

+ +    with open(mplrc, "r") as f:

+          rclines = f.readlines()

+      newlines = []

+      for line in rclines:

  -- 

  2.14.3

  

@@ -1,118 +0,0 @@ 

- From f146998e2bf6db54dae926ceec57d2baa6003ea0 Mon Sep 17 00:00:00 2001

- From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- Date: Tue, 23 Jan 2018 20:22:05 -0500

- Subject: [PATCH 2/4] Increase tolerances for FreeType 2.7.1.

- 

- Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- ---

-  lib/matplotlib/testing/decorators.py    | 2 +-

-  lib/matplotlib/tests/test_axes.py       | 5 ++---

-  lib/matplotlib/tests/test_mathtext.py   | 4 ++--

-  lib/matplotlib/tests/test_patches.py    | 3 +--

-  lib/matplotlib/tests/test_streamplot.py | 3 +--

-  lib/mpl_toolkits/tests/test_mplot3d.py  | 2 +-

-  6 files changed, 8 insertions(+), 11 deletions(-)

- 

- diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py

- index c5e069b31..ebd68cfab 100644

- --- a/lib/matplotlib/testing/decorators.py

- +++ b/lib/matplotlib/testing/decorators.py

- @@ -406,7 +406,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol,

-      return decorator

-  

-  

- -def image_comparison(baseline_images, extensions=None, tol=0,

- +def image_comparison(baseline_images, extensions=None, tol=0.1,

-                       freetype_version=None, remove_text=False,

-                       savefig_kwarg=None,

-                       # Default of mpl_test_settings fixture and cleanup too.

- diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

- index 7164d0cec..6492cc140 100644

- --- a/lib/matplotlib/tests/test_axes.py

- +++ b/lib/matplotlib/tests/test_axes.py

- @@ -671,8 +671,7 @@ def test_polar_rlabel_position():

-      ax.tick_params(rotation='auto')

-  

-  

- -@image_comparison(baseline_images=['polar_theta_wedge'], style='default',

- -                  tol=0.01 if six.PY2 else 0)

- +@image_comparison(baseline_images=['polar_theta_wedge'], style='default')

-  def test_polar_theta_limits():

-      r = np.arange(0, 3.0, 0.01)

-      theta = 2*np.pi*r

- @@ -4679,7 +4678,7 @@ def test_rc_spines():

-  

-  

-  @image_comparison(baseline_images=['rc_grid'], extensions=['png'],

- -                  savefig_kwarg={'dpi': 40})

- +                  savefig_kwarg={'dpi': 40}, tol=0.2)

-  def test_rc_grid():

-      fig = plt.figure()

-      rc_dict0 = {

- diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py

- index 7ef77ce6a..b8c9c9e8b 100644

- --- a/lib/matplotlib/tests/test_mathtext.py

- +++ b/lib/matplotlib/tests/test_mathtext.py

- @@ -174,7 +174,7 @@ def baseline_images(request, fontset, index):

-                           ['cm', 'stix', 'stixsans', 'dejavusans',

-                            'dejavuserif'])

-  @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)

- -@image_comparison(baseline_images=None)

- +@image_comparison(baseline_images=None, tol=0.31)

-  def test_mathtext_rendering(baseline_images, fontset, index, test):

-      matplotlib.rcParams['mathtext.fontset'] = fontset

-      fig = plt.figure(figsize=(5.25, 0.75))

- @@ -188,7 +188,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, test):

-                           ['cm', 'stix', 'stixsans', 'dejavusans',

-                            'dejavuserif'])

-  @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)

- -@image_comparison(baseline_images=None, extensions=['png'])

- +@image_comparison(baseline_images=None, extensions=['png'], tol=0.3)

-  def test_mathfont_rendering(baseline_images, fontset, index, test):

-      matplotlib.rcParams['mathtext.fontset'] = fontset

-      fig = plt.figure(figsize=(5.25, 0.75))

- diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py

- index 20ffa6b08..81737c84d 100644

- --- a/lib/matplotlib/tests/test_patches.py

- +++ b/lib/matplotlib/tests/test_patches.py

- @@ -267,9 +267,8 @@ def test_wedge_movement():

-          assert getattr(w, attr) == new_v

-  

-  

- -# png needs tol>=0.06, pdf tol>=1.617

-  @image_comparison(baseline_images=['wedge_range'],

- -                  remove_text=True, tol=1.65 if on_win else 0)

- +                  remove_text=True)

-  def test_wedge_range():

-      ax = plt.axes()

-  

- diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

- index 1d7e09fef..48f1e0683 100644

- --- a/lib/matplotlib/tests/test_streamplot.py

- +++ b/lib/matplotlib/tests/test_streamplot.py

- @@ -40,8 +40,7 @@ def test_startpoints():

-      plt.plot(start_x, start_y, 'ok')

-  

-  

- -@image_comparison(baseline_images=['streamplot_colormap'],

- -                  tol=.02)

- +@image_comparison(baseline_images=['streamplot_colormap'])

-  def test_colormap():

-      X, Y, U, V = velocity_field()

-      plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

- diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py

- index c157433c7..c13f3be2f 100644

- --- a/lib/mpl_toolkits/tests/test_mplot3d.py

- +++ b/lib/mpl_toolkits/tests/test_mplot3d.py

- @@ -658,7 +658,7 @@ class TestVoxels(object):

-      @image_comparison(

-          baseline_images=['voxels-xyz'],

-          extensions=['png'],

- -        tol=0.01

- +        tol=0.02

-      )

-      def test_xyz(self):

-          fig, ax = plt.subplots(subplot_kw={"projection": "3d"})

- -- 

- 2.14.3

- 

0002-Increase-tolerances-for-non-x86_64-arches.patch 0003-Increase-tolerances-for-FT-2.7.1-and-other-arches.patch
file renamed
+5 -19
@@ -1,29 +1,15 @@ 

- From 1e4e5f12b804561ab5b6bfa4ad76d44523d1568e Mon Sep 17 00:00:00 2001

+ From 85622c14c75981b832fbf49ee70231f9edb1922b Mon Sep 17 00:00:00 2001

  From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  Date: Tue, 23 Jan 2018 20:27:17 -0500

- Subject: [PATCH 3/4] Increase tolerances for FT 2.7.1 and other arches.

+ Subject: [PATCH 2/3] Increase tolerances for non-x86_64 arches.

  

  Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  ---

-  lib/matplotlib/tests/test_patheffects.py | 2 +-

-  lib/matplotlib/tests/test_streamplot.py  | 3 +--

-  2 files changed, 2 insertions(+), 3 deletions(-)

+  lib/matplotlib/tests/test_streamplot.py | 3 +--

+  1 file changed, 1 insertion(+), 2 deletions(-)

  

- diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py

- index 9b8a4379c..e36d6deb6 100644

- --- a/lib/matplotlib/tests/test_patheffects.py

- +++ b/lib/matplotlib/tests/test_patheffects.py

- @@ -125,7 +125,7 @@ def test_SimplePatchShadow_offset():

-      assert pe._offset == (4, 5)

-  

-  

- -@image_comparison(baseline_images=['collection'], tol=0.015)

- +@image_comparison(baseline_images=['collection'], tol=0.019)

-  def test_collection():

-      x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))

-      data = np.sin(x) + np.cos(y)

  diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

- index 48f1e0683..aadcf6bfd 100644

+ index 81a51e711..4f70ce861 100644

  --- a/lib/matplotlib/tests/test_streamplot.py

  +++ b/lib/matplotlib/tests/test_streamplot.py

  @@ -58,8 +58,7 @@ def test_linewidth():

@@ -0,0 +1,558 @@ 

+ From a1975064e7b68e8587904415b2f3c51ff233089d Mon Sep 17 00:00:00 2001

+ From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ Date: Sat, 31 Mar 2018 00:15:14 -0400

+ Subject: [PATCH 3/3] Increase some tolerances for 32-bit systems.

+ 

+ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

+ ---

+  lib/matplotlib/testing/decorators.py               |  2 +-

+  lib/matplotlib/tests/test_artist.py                |  3 +-

+  lib/matplotlib/tests/test_axes.py                  | 47 +++++++++++-----------

+  lib/matplotlib/tests/test_collections.py           |  2 +-

+  lib/matplotlib/tests/test_colorbar.py              | 11 ++---

+  lib/matplotlib/tests/test_constrainedlayout.py     |  2 +-

+  lib/matplotlib/tests/test_contour.py               |  6 +--

+  lib/matplotlib/tests/test_image.py                 |  2 +-

+  lib/matplotlib/tests/test_mathtext.py              |  4 +-

+  lib/matplotlib/tests/test_patches.py               |  3 +-

+  lib/matplotlib/tests/test_patheffects.py           |  2 +-

+  lib/matplotlib/tests/test_pickle.py                |  2 +-

+  lib/matplotlib/tests/test_quiver.py                |  2 +-

+  lib/matplotlib/tests/test_streamplot.py            |  3 +-

+  lib/matplotlib/tests/test_transforms.py            |  2 +-

+  .../tests/test_axisartist_floating_axes.py         |  4 +-

+  .../test_axisartist_grid_helper_curvelinear.py     |  4 +-

+  lib/mpl_toolkits/tests/test_mplot3d.py             |  4 +-

+  18 files changed, 52 insertions(+), 53 deletions(-)

+ 

+ diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py

+ index 0ce6e6252..9a80eec1a 100644

+ --- a/lib/matplotlib/testing/decorators.py

+ +++ b/lib/matplotlib/testing/decorators.py

+ @@ -408,7 +408,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol,

+      return decorator

+  

+  

+ -def image_comparison(baseline_images, extensions=None, tol=0,

+ +def image_comparison(baseline_images, extensions=None, tol=0.1,

+                       freetype_version=None, remove_text=False,

+                       savefig_kwarg=None,

+                       # Default of mpl_test_settings fixture and cleanup too.

+ diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py

+ index 8d1a01294..02acbb206 100644

+ --- a/lib/matplotlib/tests/test_artist.py

+ +++ b/lib/matplotlib/tests/test_artist.py

+ @@ -96,7 +96,8 @@ def test_collection_transform_of_none():

+      assert isinstance(c._transOffset, mtransforms.IdentityTransform)

+  

+  

+ -@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True)

+ +@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True,

+ +                  tol=0.28)

+  def test_clipping():

+      exterior = mpath.Path.unit_rectangle().deepcopy()

+      exterior.vertices *= 4

+ diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

+ index 77ec92b01..f16e70cfd 100644

+ --- a/lib/matplotlib/tests/test_axes.py

+ +++ b/lib/matplotlib/tests/test_axes.py

+ @@ -523,7 +523,7 @@ def test_single_point():

+      plt.plot('b', 'b', 'o', data=data)

+  

+  

+ -@image_comparison(baseline_images=['single_date'])

+ +@image_comparison(baseline_images=['single_date'], tol=1.97)

+  def test_single_date():

+      time1 = [721964.0]

+      data1 = [-65.54]

+ @@ -707,8 +707,7 @@ def test_polar_rlabel_position():

+      ax.tick_params(rotation='auto')

+  

+  

+ -@image_comparison(baseline_images=['polar_theta_wedge'], style='default',

+ -                  tol=0.01 if six.PY2 else 0)

+ +@image_comparison(baseline_images=['polar_theta_wedge'], style='default')

+  def test_polar_theta_limits():

+      r = np.arange(0, 3.0, 0.01)

+      theta = 2*np.pi*r

+ @@ -1008,7 +1007,7 @@ def test_fill_between_interpolate():

+  

+  

+  @image_comparison(baseline_images=['fill_between_interpolate_decreasing'],

+ -                  style='mpl20', remove_text=True)

+ +                  style='mpl20', remove_text=True, tol=0.78)

+  def test_fill_between_interpolate_decreasing():

+      p = np.array([724.3, 700, 655])

+      t = np.array([9.4, 7, 2.2])

+ @@ -1122,7 +1121,7 @@ def test_pcolormesh():

+  

+  

+  @image_comparison(baseline_images=['pcolormesh_datetime_axis'],

+ -                  extensions=['png'], remove_text=False)

+ +                  extensions=['png'], remove_text=False, tol=0.19)

+  def test_pcolormesh_datetime_axis():

+      fig = plt.figure()

+      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

+ @@ -1148,7 +1147,7 @@ def test_pcolormesh_datetime_axis():

+  

+  

+  @image_comparison(baseline_images=['pcolor_datetime_axis'],

+ -                  extensions=['png'], remove_text=False)

+ +                  extensions=['png'], remove_text=False, tol=0.19)

+  def test_pcolor_datetime_axis():

+      fig = plt.figure()

+      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

+ @@ -1205,7 +1204,7 @@ def test_canonical():

+  

+  

+  @image_comparison(baseline_images=['arc_angles'], remove_text=True,

+ -                  style='default', extensions=['png'])

+ +                  style='default', extensions=['png'], tol=0.17)

+  def test_arc_angles():

+      from matplotlib import patches

+      # Ellipse parameters

+ @@ -2467,7 +2466,7 @@ def test_boxplot_mod_artist_after_plotting():

+  

+  @image_comparison(baseline_images=['violinplot_vert_baseline',

+                                     'violinplot_vert_baseline'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.24)

+  def test_vert_violinplot_baseline():

+      # First 9 digits of frac(sqrt(2))

+      np.random.seed(414213562)

+ @@ -2485,7 +2484,7 @@ def test_vert_violinplot_baseline():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showmeans'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_vert_violinplot_showmeans():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(3))

+ @@ -2496,7 +2495,7 @@ def test_vert_violinplot_showmeans():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showextrema'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_vert_violinplot_showextrema():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(5))

+ @@ -2507,7 +2506,7 @@ def test_vert_violinplot_showextrema():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showmedians'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_vert_violinplot_showmedians():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(7))

+ @@ -2518,7 +2517,7 @@ def test_vert_violinplot_showmedians():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_showall'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.2)

+  def test_vert_violinplot_showall():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(11))

+ @@ -2529,7 +2528,7 @@ def test_vert_violinplot_showall():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_custompoints_10'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_vert_violinplot_custompoints_10():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(13))

+ @@ -2540,7 +2539,7 @@ def test_vert_violinplot_custompoints_10():

+  

+  

+  @image_comparison(baseline_images=['violinplot_vert_custompoints_200'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_vert_violinplot_custompoints_200():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(17))

+ @@ -2551,7 +2550,7 @@ def test_vert_violinplot_custompoints_200():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_baseline'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.2)

+  def test_horiz_violinplot_baseline():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(19))

+ @@ -2562,7 +2561,7 @@ def test_horiz_violinplot_baseline():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showmedians'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.23)

+  def test_horiz_violinplot_showmedians():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(23))

+ @@ -2573,7 +2572,7 @@ def test_horiz_violinplot_showmedians():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showmeans'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.25)

+  def test_horiz_violinplot_showmeans():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(29))

+ @@ -2584,7 +2583,7 @@ def test_horiz_violinplot_showmeans():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showextrema'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.2)

+  def test_horiz_violinplot_showextrema():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(31))

+ @@ -2595,7 +2594,7 @@ def test_horiz_violinplot_showextrema():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_showall'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.19)

+  def test_horiz_violinplot_showall():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(37))

+ @@ -2606,7 +2605,7 @@ def test_horiz_violinplot_showall():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_custompoints_10'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_horiz_violinplot_custompoints_10():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(41))

+ @@ -2617,7 +2616,7 @@ def test_horiz_violinplot_custompoints_10():

+  

+  

+  @image_comparison(baseline_images=['violinplot_horiz_custompoints_200'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.22)

+  def test_horiz_violinplot_custompoints_200():

+      ax = plt.axes()

+      # First 9 digits of frac(sqrt(43))

+ @@ -3964,7 +3963,7 @@ def test_psd_noise():

+  

+  

+  @image_comparison(baseline_images=['csd_freqs'], remove_text=True,

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.21)

+  def test_csd_freqs():

+      '''test axes.csd with sinusoidal stimuli'''

+      n = 10000

+ @@ -4823,7 +4822,7 @@ def test_rc_spines():

+  

+  

+  @image_comparison(baseline_images=['rc_grid'], extensions=['png'],

+ -                  savefig_kwarg={'dpi': 40})

+ +                  savefig_kwarg={'dpi': 40}, tol=0.2)

+  def test_rc_grid():

+      fig = plt.figure()

+      rc_dict0 = {

+ @@ -5318,7 +5317,7 @@ def test_date_timezone_y():

+  

+  

+  @image_comparison(baseline_images=['date_timezone_x_and_y'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=3.05)

+  def test_date_timezone_x_and_y():

+      # Tests issue 5575

+      time_index = [pytz.timezone('UTC').localize(datetime.datetime(

+ diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py

+ index 291647d17..265f23fed 100644

+ --- a/lib/matplotlib/tests/test_collections.py

+ +++ b/lib/matplotlib/tests/test_collections.py

+ @@ -467,7 +467,7 @@ def test_EllipseCollection():

+  

+  

+  @image_comparison(baseline_images=['polycollection_close'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.45)

+  def test_polycollection_close():

+      from mpl_toolkits.mplot3d import Axes3D

+  

+ diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py

+ index 539ee8c83..ae21e723f 100644

+ --- a/lib/matplotlib/tests/test_colorbar.py

+ +++ b/lib/matplotlib/tests/test_colorbar.py

+ @@ -95,7 +95,7 @@ def _colorbar_extension_length(spacing):

+  @image_comparison(

+          baseline_images=['colorbar_extensions_shape_uniform',

+                           'colorbar_extensions_shape_proportional'],

+ -        extensions=['png'])

+ +        extensions=['png'], tol=0.16)

+  def test_colorbar_extension_shape():

+      '''Test rectangular colorbar extensions.'''

+      # Create figures for uniform and proportionally spaced colorbars.

+ @@ -105,7 +105,7 @@ def test_colorbar_extension_shape():

+  

+  @image_comparison(baseline_images=['colorbar_extensions_uniform',

+                                     'colorbar_extensions_proportional'],

+ -                  extensions=['png'])

+ +                  extensions=['png'], tol=0.25)

+  def test_colorbar_extension_length():

+      '''Test variable length colorbar extensions.'''

+      # Create figures for uniform and proportionally spaced colorbars.

+ @@ -119,7 +119,7 @@ def test_colorbar_extension_length():

+                                     'cbar_sharing',

+                                     ],

+                    extensions=['png'], remove_text=True,

+ -                  savefig_kwarg={'dpi': 40})

+ +                  savefig_kwarg={'dpi': 40}, tol=0.17)

+  def test_colorbar_positioning():

+      data = np.arange(1200).reshape(30, 40)

+      levels = [0, 200, 400, 600, 800, 1000, 1200]

+ @@ -173,7 +173,7 @@ def test_colorbar_positioning():

+  

+  @image_comparison(baseline_images=['cbar_with_subplots_adjust'],

+                    extensions=['png'], remove_text=True,

+ -                  savefig_kwarg={'dpi': 40})

+ +                  savefig_kwarg={'dpi': 40}, tol=0.17)

+  def test_gridspec_make_colorbar():

+      plt.figure()

+      data = np.arange(1200).reshape(30, 40)

+ @@ -233,7 +233,8 @@ def test_colorbarbase():

+  

+  @image_comparison(

+      baseline_images=['colorbar_closed_patch'],

+ -    remove_text=True)

+ +    remove_text=True,

+ +    tol=0.22)

+  def test_colorbar_closed_patch():

+      fig = plt.figure(figsize=(8, 6))

+      ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1])

+ diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py

+ index 9c36fb247..929e38bd8 100644

+ --- a/lib/matplotlib/tests/test_constrainedlayout.py

+ +++ b/lib/matplotlib/tests/test_constrainedlayout.py

+ @@ -296,7 +296,7 @@ def test_constrained_layout12():

+      ax.set_xlabel('x-label')

+  

+  

+ -@image_comparison(baseline_images=['constrained_layout13'], tol=2.e-2,

+ +@image_comparison(baseline_images=['constrained_layout13'], tol=3.e-2,

+          extensions=['png'])

+  def test_constrained_layout13():

+      'Test that padding works.'

+ diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py

+ index 35d33b972..f10483ce4 100644

+ --- a/lib/matplotlib/tests/test_contour.py

+ +++ b/lib/matplotlib/tests/test_contour.py

+ @@ -225,7 +225,7 @@ def test_given_colors_levels_and_extends():

+  

+  

+  @image_comparison(baseline_images=['contour_datetime_axis'],

+ -                  extensions=['png'], remove_text=False)

+ +                  extensions=['png'], remove_text=False, tol=0.18)

+  def test_contour_datetime_axis():

+      fig = plt.figure()

+      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

+ @@ -251,7 +251,7 @@ def test_contour_datetime_axis():

+  

+  

+  @image_comparison(baseline_images=['contour_test_label_transforms'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=1.38)

+  def test_labels():

+      # Adapted from pylab_examples example code: contour_demo.py

+      # see issues #2475, #2843, and #2818 for explanation

+ @@ -282,7 +282,7 @@ def test_labels():

+  

+  @image_comparison(baseline_images=['contour_corner_mask_False',

+                                     'contour_corner_mask_True'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.19)

+  def test_corner_mask():

+      n = 60

+      mask_level = 0.95

+ diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py

+ index 26e3b4a7e..269f814bb 100644

+ --- a/lib/matplotlib/tests/test_image.py

+ +++ b/lib/matplotlib/tests/test_image.py

+ @@ -784,7 +784,7 @@ def test_imshow_endianess():

+  

+  

+  @image_comparison(baseline_images=['imshow_masked_interpolation'],

+ -                  remove_text=True, style='mpl20')

+ +                  remove_text=True, style='mpl20', tol=0.25)

+  def test_imshow_masked_interpolation():

+  

+      cm = copy(plt.get_cmap('viridis'))

+ diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py

+ index cdc1093e1..ac0d8bf05 100644

+ --- a/lib/matplotlib/tests/test_mathtext.py

+ +++ b/lib/matplotlib/tests/test_mathtext.py

+ @@ -173,7 +173,7 @@ def baseline_images(request, fontset, index):

+                           ['cm', 'stix', 'stixsans', 'dejavusans',

+                            'dejavuserif'])

+  @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)

+ -@image_comparison(baseline_images=None)

+ +@image_comparison(baseline_images=None, tol=0.31)

+  def test_mathtext_rendering(baseline_images, fontset, index, test):

+      matplotlib.rcParams['mathtext.fontset'] = fontset

+      fig = plt.figure(figsize=(5.25, 0.75))

+ @@ -187,7 +187,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, test):

+                           ['cm', 'stix', 'stixsans', 'dejavusans',

+                            'dejavuserif'])

+  @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)

+ -@image_comparison(baseline_images=None, extensions=['png'])

+ +@image_comparison(baseline_images=None, extensions=['png'], tol=0.3)

+  def test_mathfont_rendering(baseline_images, fontset, index, test):

+      matplotlib.rcParams['mathtext.fontset'] = fontset

+      fig = plt.figure(figsize=(5.25, 0.75))

+ diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py

+ index ff1abb9c6..cc90e6bb0 100644

+ --- a/lib/matplotlib/tests/test_patches.py

+ +++ b/lib/matplotlib/tests/test_patches.py

+ @@ -266,9 +266,8 @@ def test_wedge_movement():

+          assert getattr(w, attr) == new_v

+  

+  

+ -# png needs tol>=0.06, pdf tol>=1.617

+  @image_comparison(baseline_images=['wedge_range'],

+ -                  remove_text=True, tol=1.65 if on_win else 0)

+ +                  remove_text=True)

+  def test_wedge_range():

+      ax = plt.axes()

+  

+ diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py

+ index fe7265957..2addc35ed 100644

+ --- a/lib/matplotlib/tests/test_patheffects.py

+ +++ b/lib/matplotlib/tests/test_patheffects.py

+ @@ -121,7 +121,7 @@ def test_SimplePatchShadow_offset():

+      assert pe._offset == (4, 5)

+  

+  

+ -@image_comparison(baseline_images=['collection'], tol=0.02)

+ +@image_comparison(baseline_images=['collection'], tol=0.084)

+  def test_collection():

+      x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))

+      data = np.sin(x) + np.cos(y)

+ diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py

+ index 89a5a512e..a25961284 100644

+ --- a/lib/matplotlib/tests/test_pickle.py

+ +++ b/lib/matplotlib/tests/test_pickle.py

+ @@ -42,7 +42,7 @@ def test_simple():

+  

+  @image_comparison(baseline_images=['multi_pickle'],

+                    extensions=['png'], remove_text=True,

+ -                  style='mpl20')

+ +                  style='mpl20', tol=0.11)

+  def test_complete():

+      fig = plt.figure('Figure with a label?', figsize=(10, 6))

+  

+ diff --git a/lib/matplotlib/tests/test_quiver.py b/lib/matplotlib/tests/test_quiver.py

+ index a0e1e674f..ede6bfc64 100644

+ --- a/lib/matplotlib/tests/test_quiver.py

+ +++ b/lib/matplotlib/tests/test_quiver.py

+ @@ -131,7 +131,7 @@ def test_quiver_key_pivot():

+  

+  

+  @image_comparison(baseline_images=['barbs_test_image'],

+ -                  extensions=['png'], remove_text=True)

+ +                  extensions=['png'], remove_text=True, tol=0.11)

+  def test_barbs():

+      x = np.linspace(-5, 5, 5)

+      X, Y = np.meshgrid(x, x)

+ diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

+ index 4f70ce861..5bc8184f7 100644

+ --- a/lib/matplotlib/tests/test_streamplot.py

+ +++ b/lib/matplotlib/tests/test_streamplot.py

+ @@ -39,8 +39,7 @@ def test_startpoints():

+      plt.plot(start_x, start_y, 'ok')

+  

+  

+ -@image_comparison(baseline_images=['streamplot_colormap'],

+ -                  tol=.02)

+ +@image_comparison(baseline_images=['streamplot_colormap'])

+  def test_colormap():

+      X, Y, U, V = velocity_field()

+      plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,

+ diff --git a/lib/matplotlib/tests/test_transforms.py b/lib/matplotlib/tests/test_transforms.py

+ index 06985db84..8efaef898 100644

+ --- a/lib/matplotlib/tests/test_transforms.py

+ +++ b/lib/matplotlib/tests/test_transforms.py

+ @@ -74,7 +74,7 @@ def test_external_transform_api():

+  

+  

+  @image_comparison(baseline_images=['pre_transform_data'],

+ -                  tol=0.08)

+ +                  tol=0.155)

+  def test_pre_transform_plotting():

+      # a catch-all for as many as possible plot layouts which handle

+      # pre-transforming the data NOTE: The axis range is important in this

+ diff --git a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py

+ index de7226609..af2283541 100644

+ --- a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py

+ +++ b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py

+ @@ -24,7 +24,7 @@ def test_subplot():

+  

+  

+  @image_comparison(baseline_images=['curvelinear3'],

+ -                  extensions=['png'], style='default', tol=0.01)

+ +                  extensions=['png'], style='default', tol=0.02)

+  def test_curvelinear3():

+      fig = plt.figure(figsize=(5, 5))

+      fig.clf()

+ @@ -80,7 +80,7 @@ def test_curvelinear3():

+  

+  

+  @image_comparison(baseline_images=['curvelinear4'],

+ -                  extensions=['png'], style='default', tol=0.01)

+ +                  extensions=['png'], style='default', tol=0.05)

+  def test_curvelinear4():

+      fig = plt.figure(figsize=(5, 5))

+      fig.clf()

+ diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+ index a7c637428..61d41d354 100644

+ --- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+ +++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+ @@ -91,7 +91,7 @@ def test_custom_transform():

+  

+  

+  @image_comparison(baseline_images=['polar_box'],

+ -                  extensions=['png'], style='default', tol=0.03)

+ +                  extensions=['png'], style='default', tol=0.08)

+  def test_polar_box():

+      fig = plt.figure(figsize=(5, 5))

+  

+ @@ -152,7 +152,7 @@ def test_polar_box():

+  

+  

+  @image_comparison(baseline_images=['axis_direction'],

+ -                  extensions=['png'], style='default', tol=0.03)

+ +                  extensions=['png'], style='default', tol=0.05)

+  def test_axis_direction():

+      fig = plt.figure(figsize=(5, 5))

+  

+ diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py

+ index 0a506db92..44e1681fc 100644

+ --- a/lib/mpl_toolkits/tests/test_mplot3d.py

+ +++ b/lib/mpl_toolkits/tests/test_mplot3d.py

+ @@ -225,7 +225,7 @@ def test_text3d():

+      ax.set_zlabel('Z axis')

+  

+  

+ -@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)

+ +@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.05)

+  def test_trisurf3d():

+      n_angles = 36

+      n_radii = 8

+ @@ -704,7 +704,7 @@ class TestVoxels(object):

+      @image_comparison(

+          baseline_images=['voxels-xyz'],

+          extensions=['png'],

+ -        tol=0.01

+ +        tol=0.02

+      )

+      def test_xyz(self):

+          fig, ax = plt.subplots(subplot_kw={"projection": "3d"})

+ -- 

+ 2.14.3

+ 

0003-Increase-some-tolerances-for-non-x86-arches.patch 0004-Increase-some-tolerances-for-non-x86-arches.patch
file renamed
+93 -42
@@ -1,27 +1,30 @@ 

- From cd26dbd863d0cf2cce4d249c4941cf68d6f838ba Mon Sep 17 00:00:00 2001

+ From b35bcac297de5fbf24a093c0a0121856ba7a7b41 Mon Sep 17 00:00:00 2001

  From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- Date: Wed, 24 Jan 2018 03:02:19 -0500

- Subject: [PATCH 4/4] Increase some tolerances for non-x86 arches.

+ Date: Sat, 31 Mar 2018 00:33:37 -0400

+ Subject: [PATCH 3/3] Increase some tolerances for non-x86 arches.

  

  Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

  ---

-  lib/matplotlib/tests/test_arrow_patches.py | 4 ++--

-  lib/matplotlib/tests/test_axes.py          | 5 +++--

-  lib/matplotlib/tests/test_collections.py   | 2 +-

-  lib/matplotlib/tests/test_cycles.py        | 6 +++---

-  lib/matplotlib/tests/test_image.py         | 2 +-

-  lib/matplotlib/tests/test_legend.py        | 6 +++---

-  lib/matplotlib/tests/test_pickle.py        | 2 +-

-  lib/matplotlib/tests/test_scale.py         | 2 +-

-  lib/matplotlib/tests/test_streamplot.py    | 2 +-

-  lib/matplotlib/tests/test_units.py         | 4 ++--

-  10 files changed, 18 insertions(+), 17 deletions(-)

+  lib/matplotlib/tests/test_arrow_patches.py                        | 4 ++--

+  lib/matplotlib/tests/test_axes.py                                 | 7 ++++---

+  lib/matplotlib/tests/test_collections.py                          | 2 +-

+  lib/matplotlib/tests/test_constrainedlayout.py                    | 2 +-

+  lib/matplotlib/tests/test_cycles.py                               | 6 +++---

+  lib/matplotlib/tests/test_figure.py                               | 2 +-

+  lib/matplotlib/tests/test_image.py                                | 2 +-

+  lib/matplotlib/tests/test_legend.py                               | 6 +++---

+  lib/matplotlib/tests/test_pickle.py                               | 2 +-

+  lib/matplotlib/tests/test_scale.py                                | 2 +-

+  lib/matplotlib/tests/test_streamplot.py                           | 2 +-

+  lib/matplotlib/tests/test_units.py                                | 4 ++--

+  lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py | 2 +-

+  13 files changed, 22 insertions(+), 21 deletions(-)

  

  diff --git a/lib/matplotlib/tests/test_arrow_patches.py b/lib/matplotlib/tests/test_arrow_patches.py

- index 0a5894a30..1f75169ca 100644

+ index 44f87c5fe..fb50ae710 100644

  --- a/lib/matplotlib/tests/test_arrow_patches.py

  +++ b/lib/matplotlib/tests/test_arrow_patches.py

- @@ -69,7 +69,7 @@ def __prepare_fancyarrow_dpi_cor_test():

+ @@ -68,7 +68,7 @@ def __prepare_fancyarrow_dpi_cor_test():

   

   

   @image_comparison(baseline_images=['fancyarrow_dpi_cor_100dpi'],
@@ -30,7 +33,7 @@ 

                     savefig_kwarg=dict(dpi=100))

   def test_fancyarrow_dpi_cor_100dpi():

       """

- @@ -84,7 +84,7 @@ def test_fancyarrow_dpi_cor_100dpi():

+ @@ -83,7 +83,7 @@ def test_fancyarrow_dpi_cor_100dpi():

   

   

   @image_comparison(baseline_images=['fancyarrow_dpi_cor_200dpi'],
@@ -40,10 +43,19 @@ 

   def test_fancyarrow_dpi_cor_200dpi():

       """

  diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

- index 6492cc140..3bd1c0fda 100644

+ index 77ec92b01..49a4d9290 100644

  --- a/lib/matplotlib/tests/test_axes.py

  +++ b/lib/matplotlib/tests/test_axes.py

- @@ -3229,7 +3229,8 @@ def test_vertex_markers():

+ @@ -389,7 +389,7 @@ def test_annotate_default_arrow():

+      assert ann.arrow_patch is not None

+  

+  

+ -@image_comparison(baseline_images=['polar_axes'], style='default')

+ +@image_comparison(baseline_images=['polar_axes'], style='default', tol=0.01)

+  def test_polar_annotations():

+      # you can specify the xypoint and the xytext in different

+      # positions and coordinate systems, and optionally turn on a

+ @@ -3284,7 +3284,8 @@ def test_vertex_markers():

   

   

   @image_comparison(baseline_images=['vline_hline_zorder',
@@ -53,7 +65,7 @@ 

   def test_eb_line_zorder():

       x = list(xrange(10))

   

- @@ -4866,7 +4867,7 @@ def test_title_location_roundtrip():

+ @@ -5017,7 +5018,7 @@ def test_title_location_roundtrip():

   

   

   @image_comparison(baseline_images=["loglog"], remove_text=True,
@@ -63,10 +75,10 @@ 

       fig, ax = plt.subplots()

       x = np.arange(1, 11)

  diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py

- index c27aeb11a..969bf41cf 100644

+ index 291647d17..6b623ef52 100644

  --- a/lib/matplotlib/tests/test_collections.py

  +++ b/lib/matplotlib/tests/test_collections.py

- @@ -444,7 +444,7 @@ def test_barb_limits():

+ @@ -443,7 +443,7 @@ def test_barb_limits():

   

   

   @image_comparison(baseline_images=['EllipseCollection_test_image'],
@@ -75,8 +87,21 @@ 

                     remove_text=True)

   def test_EllipseCollection():

       # Test basic functionality

+ diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py

+ index 9c36fb247..3834e4e26 100644

+ --- a/lib/matplotlib/tests/test_constrainedlayout.py

+ +++ b/lib/matplotlib/tests/test_constrainedlayout.py

+ @@ -223,7 +223,7 @@ def test_constrained_layout9():

+  

+  

+  @image_comparison(baseline_images=['constrained_layout10'],

+ -        extensions=['png'])

+ +        extensions=['png'], tol=0.01)

+  def test_constrained_layout10():

+      'Test for handling legend outside axis'

+      fig, axs = plt.subplots(2, 2, constrained_layout=True)

  diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py

- index eadaf2508..5d1144f5e 100644

+ index 95611f36c..0a118b636 100644

  --- a/lib/matplotlib/tests/test_cycles.py

  +++ b/lib/matplotlib/tests/test_cycles.py

  @@ -10,7 +10,7 @@ from cycler import cycler
@@ -106,11 +131,24 @@ 

   def test_linestylecycle_basic():

       fig = plt.figure()

       ax = fig.add_subplot(111)

+ diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py

+ index 229ce192c..0e7a10d46 100644

+ --- a/lib/matplotlib/tests/test_figure.py

+ +++ b/lib/matplotlib/tests/test_figure.py

+ @@ -14,7 +14,7 @@ import numpy as np

+  import pytest

+  

+  

+ -@image_comparison(baseline_images=['figure_align_labels'])

+ +@image_comparison(baseline_images=['figure_align_labels'], tol=0.01)

+  def test_align_labels():

+      # Check the figure.align_labels() command

+      fig = plt.figure(tight_layout=True)

  diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py

- index fd6430d56..b4190713f 100644

+ index 26e3b4a7e..2c7cedf74 100644

  --- a/lib/matplotlib/tests/test_image.py

  +++ b/lib/matplotlib/tests/test_image.py

- @@ -754,7 +754,7 @@ def test_imshow_endianess():

+ @@ -784,7 +784,7 @@ def test_imshow_endianess():

   

   

   @image_comparison(baseline_images=['imshow_masked_interpolation'],
@@ -120,10 +158,10 @@ 

   

       cm = copy(plt.get_cmap('viridis'))

  diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py

- index e63aa8ef9..d984bcac1 100644

+ index 55b8adc77..1784ff966 100644

  --- a/lib/matplotlib/tests/test_legend.py

  +++ b/lib/matplotlib/tests/test_legend.py

- @@ -141,7 +141,7 @@ def test_multiple_keys():

+ @@ -145,7 +145,7 @@ def test_multiple_keys():

   

   

   @image_comparison(baseline_images=['rgba_alpha'],
@@ -132,7 +170,7 @@ 

   def test_alpha_rgba():

       import matplotlib.pyplot as plt

   

- @@ -152,7 +152,7 @@ def test_alpha_rgba():

+ @@ -156,7 +156,7 @@ def test_alpha_rgba():

   

   

   @image_comparison(baseline_images=['rcparam_alpha'],
@@ -141,7 +179,7 @@ 

   def test_alpha_rcparam():

       import matplotlib.pyplot as plt

   

- @@ -179,7 +179,7 @@ def test_fancy():

+ @@ -183,7 +183,7 @@ def test_fancy():

                  ncol=2, shadow=True, title="My legend", numpoints=1)

   

   
@@ -151,23 +189,23 @@ 

       x = np.linspace(1, 100, 100)

       y = x

  diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py

- index bd6ac6862..ea8afd807 100644

+ index 89a5a512e..99051dee7 100644

  --- a/lib/matplotlib/tests/test_pickle.py

  +++ b/lib/matplotlib/tests/test_pickle.py

- @@ -41,7 +41,7 @@ def test_simple():

-      pickle.dump(fig, BytesIO(), pickle.HIGHEST_PROTOCOL)

+ @@ -42,7 +42,7 @@ def test_simple():

   

-  

- -@image_comparison(baseline_images=['multi_pickle'],

- +@image_comparison(baseline_images=['multi_pickle'], tol=0.004,

+  @image_comparison(baseline_images=['multi_pickle'],

                     extensions=['png'], remove_text=True,

-                    style='mpl20')

+ -                  style='mpl20')

+ +                  style='mpl20', tol=0.004)

   def test_complete():

+      fig = plt.figure('Figure with a label?', figsize=(10, 6))

+  

  diff --git a/lib/matplotlib/tests/test_scale.py b/lib/matplotlib/tests/test_scale.py

- index 9b78377b2..4994ba91d 100644

+ index c50a0a896..a33fcccf0 100644

  --- a/lib/matplotlib/tests/test_scale.py

  +++ b/lib/matplotlib/tests/test_scale.py

- @@ -75,7 +75,7 @@ def test_extra_kwargs_raise():

+ @@ -97,7 +97,7 @@ def test_logscale_transform_repr():

   

   

   @image_comparison(baseline_images=['logscale_nonpos_values'], remove_text=True,
@@ -177,7 +215,7 @@ 

       np.random.seed(19680801)

       xs = np.random.normal(size=int(1e3))

  diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py

- index aadcf6bfd..473991268 100644

+ index 4f70ce861..4e52ed0c4 100644

  --- a/lib/matplotlib/tests/test_streamplot.py

  +++ b/lib/matplotlib/tests/test_streamplot.py

  @@ -48,7 +48,7 @@ def test_colormap():
@@ -190,10 +228,10 @@ 

       X, Y, U, V = velocity_field()

       speed = np.sqrt(U*U + V*V)

  diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py

- index f72ac2c60..781a3850e 100644

+ index 65c8da7ea..c69d1d531 100644

  --- a/lib/matplotlib/tests/test_units.py

  +++ b/lib/matplotlib/tests/test_units.py

- @@ -39,7 +39,7 @@ class Quantity(object):

+ @@ -43,7 +43,7 @@ class Quantity(object):

   

   # Tests that the conversion machinery works properly for classes that

   # work as a facade over numpy arrays (like pint)
@@ -202,7 +240,7 @@ 

                     extensions=['png'], remove_text=False, style='mpl20')

   def test_numpy_facade():

       # Create an instance of the conversion interface and

- @@ -83,7 +83,7 @@ def test_numpy_facade():

+ @@ -87,7 +87,7 @@ def test_numpy_facade():

   

   

   # Tests gh-8908
@@ -211,6 +249,19 @@ 

                     extensions=['png'], remove_text=True, style='mpl20')

   def test_plot_masked_units():

       data = np.linspace(-5, 5)

+ diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+ index a7c637428..8fc5b25b1 100644

+ --- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+ +++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+ @@ -91,7 +91,7 @@ def test_custom_transform():

+  

+  

+  @image_comparison(baseline_images=['polar_box'],

+ -                  extensions=['png'], style='default', tol=0.03)

+ +                  extensions=['png'], style='default', tol=0.04)

+  def test_polar_box():

+      fig = plt.figure(figsize=(5, 5))

+  

  -- 

  2.14.3

  

@@ -1,402 +0,0 @@ 

- From 25c7d1af15f4478e795250360d2f778a76c2358d Mon Sep 17 00:00:00 2001

- From: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- Date: Wed, 24 Jan 2018 01:38:52 -0500

- Subject: [PATCH 4/4] Increase some tolerances for 32-bit systems.

- 

- Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>

- ---

-  lib/matplotlib/tests/test_artist.py      |  3 ++-

-  lib/matplotlib/tests/test_axes.py        | 42 ++++++++++++++++----------------

-  lib/matplotlib/tests/test_collections.py |  2 +-

-  lib/matplotlib/tests/test_colorbar.py    | 11 +++++----

-  lib/matplotlib/tests/test_contour.py     |  6 ++---

-  lib/matplotlib/tests/test_image.py       |  2 +-

-  lib/matplotlib/tests/test_patheffects.py |  2 +-

-  lib/matplotlib/tests/test_pickle.py      |  2 +-

-  lib/matplotlib/tests/test_quiver.py      |  2 +-

-  lib/matplotlib/tests/test_transforms.py  |  2 +-

-  lib/mpl_toolkits/tests/test_mplot3d.py   |  2 +-

-  11 files changed, 39 insertions(+), 37 deletions(-)

- 

- diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py

- index 786d50903..105714ef4 100644

- --- a/lib/matplotlib/tests/test_artist.py

- +++ b/lib/matplotlib/tests/test_artist.py

- @@ -95,7 +95,8 @@ def test_collection_transform_of_none():

-      assert isinstance(c._transOffset, mtransforms.IdentityTransform)

-  

-  

- -@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True)

- +@image_comparison(baseline_images=["clip_path_clipping"], remove_text=True,

- +                  tol=0.28)

-  def test_clipping():

-      exterior = mpath.Path.unit_rectangle().deepcopy()

-      exterior.vertices *= 4

- diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py

- index 6492cc140..8609d8c31 100644

- --- a/lib/matplotlib/tests/test_axes.py

- +++ b/lib/matplotlib/tests/test_axes.py

- @@ -483,7 +483,7 @@ def test_single_point():

-      plt.plot('b', 'b', 'o', data=data)

-  

-  

- -@image_comparison(baseline_images=['single_date'])

- +@image_comparison(baseline_images=['single_date'], tol=1.97)

-  def test_single_date():

-      time1 = [721964.0]

-      data1 = [-65.54]

- @@ -971,7 +971,7 @@ def test_fill_between_interpolate():

-  

-  

-  @image_comparison(baseline_images=['fill_between_interpolate_decreasing'],

- -                  style='mpl20', remove_text=True)

- +                  style='mpl20', remove_text=True, tol=0.78)

-  def test_fill_between_interpolate_decreasing():

-      p = np.array([724.3, 700, 655])

-      t = np.array([9.4, 7, 2.2])

- @@ -1085,7 +1085,7 @@ def test_pcolormesh():

-  

-  

-  @image_comparison(baseline_images=['pcolormesh_datetime_axis'],

- -                  extensions=['png'], remove_text=False)

- +                  extensions=['png'], remove_text=False, tol=0.19)

-  def test_pcolormesh_datetime_axis():

-      fig = plt.figure()

-      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

- @@ -1111,7 +1111,7 @@ def test_pcolormesh_datetime_axis():

-  

-  

-  @image_comparison(baseline_images=['pcolor_datetime_axis'],

- -                  extensions=['png'], remove_text=False)

- +                  extensions=['png'], remove_text=False, tol=0.19)

-  def test_pcolor_datetime_axis():

-      fig = plt.figure()

-      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

- @@ -1167,7 +1167,7 @@ def test_canonical():

-  

-  

-  @image_comparison(baseline_images=['arc_angles'], remove_text=True,

- -                  style='default', extensions=['png'])

- +                  style='default', extensions=['png'], tol=0.17)

-  def test_arc_angles():

-      from matplotlib import patches

-      # Ellipse parameters

- @@ -2433,7 +2433,7 @@ def test_boxplot_mod_artist_after_plotting():

-  

-  @image_comparison(baseline_images=['violinplot_vert_baseline',

-                                     'violinplot_vert_baseline'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.24)

-  def test_vert_violinplot_baseline():

-      # First 9 digits of frac(sqrt(2))

-      np.random.seed(414213562)

- @@ -2451,7 +2451,7 @@ def test_vert_violinplot_baseline():

-  

-  

-  @image_comparison(baseline_images=['violinplot_vert_showmeans'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.23)

-  def test_vert_violinplot_showmeans():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(3))

- @@ -2462,7 +2462,7 @@ def test_vert_violinplot_showmeans():

-  

-  

-  @image_comparison(baseline_images=['violinplot_vert_showextrema'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.23)

-  def test_vert_violinplot_showextrema():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(5))

- @@ -2473,7 +2473,7 @@ def test_vert_violinplot_showextrema():

-  

-  

-  @image_comparison(baseline_images=['violinplot_vert_showmedians'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.23)

-  def test_vert_violinplot_showmedians():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(7))

- @@ -2484,7 +2484,7 @@ def test_vert_violinplot_showmedians():

-  

-  

-  @image_comparison(baseline_images=['violinplot_vert_showall'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.2)

-  def test_vert_violinplot_showall():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(11))

- @@ -2495,7 +2495,7 @@ def test_vert_violinplot_showall():

-  

-  

-  @image_comparison(baseline_images=['violinplot_vert_custompoints_10'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.22)

-  def test_vert_violinplot_custompoints_10():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(13))

- @@ -2506,7 +2506,7 @@ def test_vert_violinplot_custompoints_10():

-  

-  

-  @image_comparison(baseline_images=['violinplot_vert_custompoints_200'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.22)

-  def test_vert_violinplot_custompoints_200():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(17))

- @@ -2517,7 +2517,7 @@ def test_vert_violinplot_custompoints_200():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_baseline'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.2)

-  def test_horiz_violinplot_baseline():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(19))

- @@ -2528,7 +2528,7 @@ def test_horiz_violinplot_baseline():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_showmedians'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.23)

-  def test_horiz_violinplot_showmedians():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(23))

- @@ -2539,7 +2539,7 @@ def test_horiz_violinplot_showmedians():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_showmeans'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.25)

-  def test_horiz_violinplot_showmeans():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(29))

- @@ -2550,7 +2550,7 @@ def test_horiz_violinplot_showmeans():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_showextrema'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.2)

-  def test_horiz_violinplot_showextrema():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(31))

- @@ -2561,7 +2561,7 @@ def test_horiz_violinplot_showextrema():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_showall'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.19)

-  def test_horiz_violinplot_showall():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(37))

- @@ -2572,7 +2572,7 @@ def test_horiz_violinplot_showall():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_custompoints_10'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.22)

-  def test_horiz_violinplot_custompoints_10():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(41))

- @@ -2583,7 +2583,7 @@ def test_horiz_violinplot_custompoints_10():

-  

-  

-  @image_comparison(baseline_images=['violinplot_horiz_custompoints_200'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.22)

-  def test_horiz_violinplot_custompoints_200():

-      ax = plt.axes()

-      # First 9 digits of frac(sqrt(43))

- @@ -3909,7 +3909,7 @@ def test_psd_noise():

-  

-  

-  @image_comparison(baseline_images=['csd_freqs'], remove_text=True,

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.21)

-  def test_csd_freqs():

-      '''test axes.csd with sinusoidal stimuli'''

-      n = 10000

- @@ -5153,7 +5153,7 @@ def test_date_timezone_y():

-  

-  

-  @image_comparison(baseline_images=['date_timezone_x_and_y'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=3.05)

-  def test_date_timezone_x_and_y():

-      # Tests issue 5575

-      time_index = [pytz.timezone('UTC').localize(datetime.datetime(

- diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py

- index c27aeb11a..9d39a3e91 100644

- --- a/lib/matplotlib/tests/test_collections.py

- +++ b/lib/matplotlib/tests/test_collections.py

- @@ -468,7 +468,7 @@ def test_EllipseCollection():

-  

-  

-  @image_comparison(baseline_images=['polycollection_close'],

- -                  extensions=['png'], remove_text=True)

- +                  extensions=['png'], remove_text=True, tol=0.45)

-  def test_polycollection_close():

-      from mpl_toolkits.mplot3d import Axes3D

-  

- diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py

- index b75ba7e9f..cfbb16444 100644

- --- a/lib/matplotlib/tests/test_colorbar.py

- +++ b/lib/matplotlib/tests/test_colorbar.py

- @@ -96,7 +96,7 @@ def _colorbar_extension_length(spacing):

-  @image_comparison(

-          baseline_images=['colorbar_extensions_shape_uniform',

-                           'colorbar_extensions_shape_proportional'],

- -        extensions=['png'])

- +        extensions=['png'], tol=0.16)

-  def test_colorbar_extension_shape():

-      '''Test rectangular colorbar extensions.'''

-      # Create figures for uniform and proportionally spaced colorbars.

- @@ -106,7 +106,7 @@ def test_colorbar_extension_shape():

-  

-  @image_comparison(baseline_images=['colorbar_extensions_uniform',

-                                     'colorbar_extensions_proportional'],

- -                  extensions=['png'])

- +                  extensions=['png'], tol=0.25)

-  def test_colorbar_extension_length():

-      '''Test variable length colorbar extensions.'''

-      # Create figures for uniform and proportionally spaced colorbars.

- @@ -120,7 +120,7 @@ def test_colorbar_extension_length():

-                                     'cbar_sharing',

-                                     ],

-                    extensions=['png'], remove_text=True,

- -                  savefig_kwarg={'dpi': 40})

- +                  savefig_kwarg={'dpi': 40}, tol=0.17)

-  def test_colorbar_positioning():

-      data = np.arange(1200).reshape(30, 40)

-      levels = [0, 200, 400, 600, 800, 1000, 1200]

- @@ -174,7 +174,7 @@ def test_colorbar_positioning():

-  

-  @image_comparison(baseline_images=['cbar_with_subplots_adjust'],

-                    extensions=['png'], remove_text=True,

- -                  savefig_kwarg={'dpi': 40})

- +                  savefig_kwarg={'dpi': 40}, tol=0.17)

-  def test_gridspec_make_colorbar():

-      plt.figure()

-      data = np.arange(1200).reshape(30, 40)

- @@ -234,7 +234,8 @@ def test_colorbarbase():

-  

-  @image_comparison(

-      baseline_images=['colorbar_closed_patch'],

- -    remove_text=True)

- +    remove_text=True,

- +    tol=0.22)

-  def test_colorbar_closed_patch():

-      fig = plt.figure(figsize=(8, 6))

-      ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1])

- diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py

- index 16ac9e865..29c1b26f2 100644

- --- a/lib/matplotlib/tests/test_contour.py

- +++ b/lib/matplotlib/tests/test_contour.py

- @@ -228,7 +228,7 @@ def test_given_colors_levels_and_extends():

-  

-  

-  @image_comparison(baseline_images=['contour_datetime_axis'],

- -                  extensions=['png'], remove_text=False)

- +                  extensions=['png'], remove_text=False, tol=0.18)

-  def test_contour_datetime_axis():

-      fig = plt.figure()

-      fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15)

- @@ -254,7 +254,7 @@ def test_contour_datetime_axis():

-  

-  

-  @image_comparison(baseline_images=['contour_test_label_transforms'],

- -                  extensions=['png'], remove_text=True)

- +                  extensions=['png'], remove_text=True, tol=0.74)

-  def test_labels():

-      # Adapted from pylab_examples example code: contour_demo.py

-      # see issues #2475, #2843, and #2818 for explanation

- @@ -283,7 +283,7 @@ def test_labels():

-  

-  @image_comparison(baseline_images=['contour_corner_mask_False',

-                                     'contour_corner_mask_True'],

- -                  extensions=['png'], remove_text=True)

- +                  extensions=['png'], remove_text=True, tol=0.19)

-  def test_corner_mask():

-      n = 60

-      mask_level = 0.95

- diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py

- index fd6430d56..e9bf1b1db 100644

- --- a/lib/matplotlib/tests/test_image.py

- +++ b/lib/matplotlib/tests/test_image.py

- @@ -754,7 +754,7 @@ def test_imshow_endianess():

-  

-  

-  @image_comparison(baseline_images=['imshow_masked_interpolation'],

- -                  remove_text=True, style='mpl20')

- +                  remove_text=True, style='mpl20', tol=0.25)

-  def test_imshow_masked_interpolation():

-  

-      cm = copy(plt.get_cmap('viridis'))

- diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py

- index e36d6deb6..985d69cb2 100644

- --- a/lib/matplotlib/tests/test_patheffects.py

- +++ b/lib/matplotlib/tests/test_patheffects.py

- @@ -125,7 +125,7 @@ def test_SimplePatchShadow_offset():

-      assert pe._offset == (4, 5)

-  

-  

- -@image_comparison(baseline_images=['collection'], tol=0.019)

- +@image_comparison(baseline_images=['collection'], tol=0.084)

-  def test_collection():

-      x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))

-      data = np.sin(x) + np.cos(y)

- diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py

- index bd6ac6862..512f07948 100644

- --- a/lib/matplotlib/tests/test_pickle.py

- +++ b/lib/matplotlib/tests/test_pickle.py

- @@ -43,7 +43,7 @@ def test_simple():

-  

-  @image_comparison(baseline_images=['multi_pickle'],

-                    extensions=['png'], remove_text=True,

- -                  style='mpl20')

- +                  style='mpl20', tol=0.11)

-  def test_complete():

-      fig = plt.figure('Figure with a label?', figsize=(10, 6))

-  

- diff --git a/lib/matplotlib/tests/test_quiver.py b/lib/matplotlib/tests/test_quiver.py

- index a0e1e674f..ede6bfc64 100644

- --- a/lib/matplotlib/tests/test_quiver.py

- +++ b/lib/matplotlib/tests/test_quiver.py

- @@ -131,7 +131,7 @@ def test_quiver_key_pivot():

-  

-  

-  @image_comparison(baseline_images=['barbs_test_image'],

- -                  extensions=['png'], remove_text=True)

- +                  extensions=['png'], remove_text=True, tol=0.11)

-  def test_barbs():

-      x = np.linspace(-5, 5, 5)

-      X, Y = np.meshgrid(x, x)

- diff --git a/lib/matplotlib/tests/test_transforms.py b/lib/matplotlib/tests/test_transforms.py

- index 8f19a50f3..fa4a9aa18 100644

- --- a/lib/matplotlib/tests/test_transforms.py

- +++ b/lib/matplotlib/tests/test_transforms.py

- @@ -75,7 +75,7 @@ def test_external_transform_api():

-  

-  

-  @image_comparison(baseline_images=['pre_transform_data'],

- -                  tol=0.08)

- +                  tol=0.155)

-  def test_pre_transform_plotting():

-      # a catch-all for as many as possible plot layouts which handle

-      # pre-transforming the data NOTE: The axis range is important in this

- diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py

- index c13f3be2f..81a28aadb 100644

- --- a/lib/mpl_toolkits/tests/test_mplot3d.py

- +++ b/lib/mpl_toolkits/tests/test_mplot3d.py

- @@ -198,7 +198,7 @@ def test_text3d():

-      ax.set_zlabel('Z axis')

-  

-  

- -@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.03)

- +@image_comparison(baseline_images=['trisurf3d'], remove_text=True, tol=0.05)

-  def test_trisurf3d():

-      n_angles = 36

-      n_radii = 8

- -- 

- 2.14.3

- 

file modified
+55 -26
@@ -32,9 +32,16 @@ 

  

  #global rctag rc1

  

+ # The version of FreeType in this Fedora branch.

+ %if %{fedora} >= 29

+ %global ftver 2.9

+ %else

+ %global ftver 2.8

+ %endif

+ 

  Name:           python-matplotlib

- Version:        2.1.2

- Release:        3%{?rctag:.%{rctag}}%{?dist}

+ Version:        2.2.2

+ Release:        1%{?rctag:.%{rctag}}%{?dist}

  Summary:        Python 2D plotting library

  # qt4_editor backend is MIT

  License:        Python and MIT
@@ -42,19 +49,23 @@ 

  Source0:        https://github.com/matplotlib/matplotlib/archive/v%{version}%{?rctag}/matplotlib-%{version}%{?rctag}.tar.gz

  Source1:        setup.cfg

  

- # https://github.com/matplotlib/matplotlib/pull/10310

- Patch0001:      0001-Add-libdl-on-Unix-like-systems.patch

+ # Because the qhull package stopped shipping pkgconfig files.

+ # https://src.fedoraproject.org/rpms/qhull/pull-request/1

+ Patch0001:      0001-Force-using-system-qhull.patch

  

- # Fedora-specific patches.

- # https://github.com/QuLogic/mpl-images

- Source1000:     matplotlib-%{version}-with-freetype-2.8.tar.gz

+ # Fedora-specific patches; see:

  # https://github.com/QuLogic/matplotlib/tree/fedora-patches

- Patch1001:      0001-matplotlibrc-path-search-fix.patch

- Patch1002:      0002-Increase-tolerances-for-FreeType-2.7.1.patch

- Patch1003:      0003-Increase-tolerances-for-FT-2.7.1-and-other-arches.patch

- Patch1004:      0004-Increase-some-tolerances-for-32-bit-systems.patch

  # https://github.com/QuLogic/matplotlib/tree/fedora-patches-non-x86

- Patch1005:      0004-Increase-some-tolerances-for-non-x86-arches.patch

+ # Updated test images for new FreeType.

+ Source1000:     https://github.com/QuLogic/mpl-images/archive/v%{version}-with-freetype-%{ftver}/matplotlib-%{version}-with-freetype-%{ftver}.tar.gz

+ # Search in /etc/matplotlibrc:

+ Patch1001:      0001-matplotlibrc-path-search-fix.patch

+ # Image tolerances for anything but x86_64:

+ Patch1002:      0002-Increase-tolerances-for-non-x86_64-arches.patch

+ # Image tolerances for 32-bit systems: i686 armv7hl

+ Patch1003:      0003-Increase-some-tolerances-for-32-bit-systems.patch

+ # Image tolerances for 64-bit (but not x86_64) systems: aarch64 ppc64(le) s390x

+ Patch1004:      0003-Increase-some-tolerances-for-non-x86-arches.patch

  

  BuildRequires:  freetype-devel

  BuildRequires:  libpng-devel
@@ -78,9 +89,11 @@ 

  BuildRequires:  python2-numpy

  BuildRequires:  python2-pyparsing

  BuildRequires:  python2-dateutil

+ BuildRequires:  python2-kiwisolver

  BuildRequires:  python2-pyside

  BuildRequires:  python2-setuptools

  BuildRequires:  python2-six

+ BuildRequires:  python2-sphinx

  BuildRequires:  python2-subprocess32

  BuildRequires:  python2-devel

  BuildRequires:  python2-backports-functools_lru_cache
@@ -98,6 +111,7 @@ 

  %endif

  %if %{run_tests}

  BuildRequires:  python2-pytest

+ BuildRequires:  python2-pytest-xdist

  BuildRequires:  python2-cycler >= 0.10.0

  BuildRequires:  python2-mock

  %endif
@@ -107,6 +121,7 @@ 

  Requires:       python2-pyparsing

  Requires:       python2-cycler >= 0.10.0

  Requires:       python2-dateutil

+ Requires:       python2-kiwisolver

  Requires:       python2-backports-functools_lru_cache

  Requires:       python-matplotlib-data = %{version}-%{release}

  %{?backend_subpackage:Requires: python2-matplotlib-%{backend_subpackage}%{?_isa} = %{version}-%{release}}
@@ -251,20 +266,24 @@ 

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

  BuildRequires:  python3-gobject

+ BuildRequires:  python3-kiwisolver

  BuildRequires:  python3-numpy

  BuildRequires:  python3-pillow

  BuildRequires:  python3-pyparsing

  BuildRequires:  python3-pytz

  BuildRequires:  python3-six

+ BuildRequires:  python3-sphinx

  Requires:       dejavu-sans-fonts

  Requires:       dvipng

  Requires:       python-matplotlib-data = %{version}-%{release}

  Requires:       python3-cairo

  Requires:       python3-cycler >= 0.10.0

  Requires:       python3-dateutil

+ Requires:       python3-kiwisolver

  Requires:       python3-matplotlib-%{?backend_subpackage}%{!?backend_subpackage:tk}%{?_isa} = %{version}-%{release}

  %if %{run_tests}

  BuildRequires:  python3-pytest

+ BuildRequires:  python3-pytest-xdist

  %endif

  Requires:       python3-numpy

  Recommends:     python3-pillow
@@ -340,21 +359,17 @@ 

  

  # Fedora-specific patches follow:

  %patch1001 -p1

- # Updated test images for FreeType 2.8.

- gzip -dc %SOURCE1000 | tar xvf - --transform='s~^\([^/]\+\)/~lib/\1/tests/baseline_images/~'

- %ifarch i686 armv7hl

- # Apply this because 32-bit output is a bit off.

- %patch1002 -p1

- %endif

+ # Updated test images for new FreeType.

+ gzip -dc %SOURCE1000 | tar xvf - --transform='s~^mpl-images-%{version}-with-freetype-%{ftver}/\([^/]\+\)/~lib/\1/tests/baseline_images/~'

  %ifnarch x86_64

- %patch1003 -p1

+ %patch1002 -p1

  %endif

  %ifarch aarch64 ppc64 ppc64le s390x

- %patch1005 -p1

- %endif

- %ifarch i686

  %patch1004 -p1

  %endif

+ %ifarch i686 armv7hl

+ %patch1003 -p1

+ %endif

  rm -r extern/libqhull

  

  # Copy setup.cfg to the builddir
@@ -429,17 +444,27 @@ 

  echo "backend      : %{backend}" > matplotlibrc

  # Full tests are not run because pytest doesn't seem to understand namespace

  # packages in PYTHONPATH.

+ # Skips:

+ #  * test_parasite: imports mpl_toolkits which is broken as noted above.

+ #  * test_polycollection_close: imports mpl_toolkits which is broken as noted

+ #    above.

+ #  * test_invisible_Line_rendering: Checks for "slowness" that often fails on a

+ #    heavily-loaded builder.

  MPLCONFIGDIR=$PWD \

  MATPLOTLIBDATA=%{buildroot}%{_datadir}/matplotlib/mpl-data \

  PYTHONPATH=%{buildroot}%{python2_sitearch} \

       xvfb-run -a -s "-screen 0 640x480x24" \

-          %{__python2} -m pytest --pyargs matplotlib -m 'not network' -k 'not test_polycollection_close' -ra

+          %{__python2} -m pytest --pyargs matplotlib -ra -n $(getconf _NPROCESSORS_ONLN) \

+              -m 'not network' \

+              -k 'not test_invisible_Line_rendering and not test_parasite and not test_polycollection_close'

  

  MPLCONFIGDIR=$PWD \

  MATPLOTLIBDATA=%{buildroot}%{_datadir}/matplotlib/mpl-data \

  PYTHONPATH=%{buildroot}%{python3_sitearch} \

       xvfb-run -a -s "-screen 0 640x480x24" \

-          %{__python3} tests.py -m 'not network' -ra

+          %{__python3} tests.py -ra -n $(getconf _NPROCESSORS_ONLN) \

+              -m 'not network' \

+              -k 'not test_invisible_Line_rendering'

  %endif # run_tests

  

  %files -n python-matplotlib-data
@@ -456,7 +481,7 @@ 

  

  %files -n python2-matplotlib

  %license LICENSE/

- %doc README.rst CONTRIBUTING.md

+ %doc README.rst

  %{python2_sitearch}/*egg-info

  %{python2_sitearch}/matplotlib-*-nspkg.pth

  %{python2_sitearch}/matplotlib/
@@ -510,7 +535,7 @@ 

  

  %files -n python3-matplotlib

  %license LICENSE/

- %doc README.rst CONTRIBUTING.md

+ %doc README.rst

  %{python3_sitearch}/*egg-info

  %{python3_sitearch}/matplotlib-*-nspkg.pth

  %{python3_sitearch}/matplotlib/
@@ -556,6 +581,10 @@ 

  %{python3_sitearch}/matplotlib/backends/_tkagg.*

  

  %changelog

+ * Sat Mar 31 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.2-1

+ - Update to latest release

+ - Run tests in parallel

+ 

  * Tue Mar 13 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.1.2-3

  - Cleanup spec file of old conditionals

  - Use more python2- dependencies

file modified
+2
@@ -1,2 +1,4 @@ 

  SHA512 (matplotlib-2.1.2.tar.gz) = fd93901b12a7f47cdc36d38d18de43b0cc8623dcd5597cfc1177e63cf90b0c87f718135176e2c077cd1316566a394e09e8e8e9db2ce128ee7f03021cac45543e

  SHA512 (matplotlib-2.1.2-with-freetype-2.8.tar.gz) = abe03cf24d653ecaefcda56b60631b7200d7e2d5078801f61270d5329da8e6767773a1347a1c9c7b457a0a12427c345d70e700c156dedab27275875f5bcbc439

+ SHA512 (matplotlib-2.2.2-with-freetype-2.8.tar.gz) = b31a56ee3594ec50ad6980112b435ae7cb37a0c5826f13997c5ec432c8158e584d3ef58204bff1cd2cb702dc6f050f4daea47576bd1982f40746b424da056d4d

+ SHA512 (matplotlib-2.2.2-with-freetype-2.9.tar.gz) = c1587ab3de11c5713ed7be91ecd9b31e083dd352f2af4177fd98f5bd46921eb9d4396013c58cf907618e6fbee62a0f39442e64f1df25976758fab02e5822a03f

This is an update to matplotlib 2.2.2. As the images are only built with FreeType 2.8, this is only for Fedora 28.

I will have to look into FreeType 2.9 for Rawhide as that seems to have broken a couple more test images again.

The CI failed, as expected as it was F29. An F28 build is mostly okay except for one flaky test. I suppose I could skip that one.

I added a few skips for the flaky stuff, so now it's good to go on F28: https://koji.fedoraproject.org/koji/taskinfo?taskID=26097726

3 new commits added

  • Skip another test that uses mpl_toolkits on Py2.
  • Skip flaky slowness test.
  • Patch out the rctemplate tests properly.
6 years ago

We need to update rawhide first. Also, you can open PRs to specific branches, so you don't have to fight the CI.

I didn't open against the f28 branch directly because it's not yet in sync with master.

1 new commit added

  • Add support for Rawhide / FreeType 2.9.
6 years ago

This should work on Rawhide, but I haven't tried a whole scratch build because I thought CI would do it. But it's building the srpm on F27 so it's not getting the right sources.

Here's a build on Rawhide that was set up correctly.

Ping? This is the last major release to support Python 2, so it would be nice to get into F28. The deadline for building that and getting the update into the Final is within the next day or two.

Pull-Request has been merged by rathann

6 years ago

@qulogic unfortunately, F28 build is failing on i686. Could you check this? https://koji.fedoraproject.org/koji/taskinfo?taskID=26326658 .

https://bodhi.fedoraproject.org/updates/python-matplotlib-2.2.2-1.fc28 submitted, please test, give karma and let me know if any of the currently open bugs are fixed in this release.

Oops, looks like I forgot to remove the old files from the sources list.