Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d388d2f

Browse files
authored
Merge pull request #10253 from matplotlib/auto-backport-of-pr-10077
Backport PR #10077 on branch v2.1.x
2 parents d9d5289 + 20ac580 commit d388d2f

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

extern/agg24-svn/include/agg_math_stroke.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ namespace agg
391391
vc.remove_all();
392392

393393
double cp = cross_product(v0.x, v0.y, v1.x, v1.y, v2.x, v2.y);
394-
if(cp != 0 && (cp > 0) == (m_width > 0))
394+
if ((cp > agg::vertex_dist_epsilon && m_width > 0) ||
395+
(cp < -agg::vertex_dist_epsilon && m_width < 0))
395396
{
396397
// Inner join
397398
//---------------

lib/matplotlib/tests/test_streamplot.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
from __future__ import (absolute_import, division, print_function,
22
unicode_literals)
33

4+
import sys
5+
46
import numpy as np
57
from numpy.testing import assert_array_almost_equal
68
import matplotlib.pyplot as plt
79
from matplotlib.testing.decorators import image_comparison
810
import matplotlib.transforms as mtransforms
911

1012

13+
on_win = (sys.platform == 'win32')
14+
15+
1116
def velocity_field():
1217
Y, X = np.mgrid[-3:3:100j, -3:3:100j]
1318
U = -1 - X**2 + Y
@@ -36,7 +41,7 @@ def test_startpoints():
3641

3742

3843
@image_comparison(baseline_images=['streamplot_colormap'],
39-
tol=0.002)
44+
tol=.02)
4045
def test_colormap():
4146
X, Y, U, V = velocity_field()
4247
plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2,
@@ -54,7 +59,8 @@ def test_linewidth():
5459
linewidth=lw)
5560

5661

57-
@image_comparison(baseline_images=['streamplot_masks_and_nans'])
62+
@image_comparison(baseline_images=['streamplot_masks_and_nans'],
63+
tol=0.04 if on_win else 0)
5864
def test_masks_and_nans():
5965
X, Y, U, V = velocity_field()
6066
mask = np.zeros(U.shape, dtype=bool)

lib/matplotlib/tests/test_triangulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ def z(x, y):
785785

786786

787787
@image_comparison(baseline_images=['tri_smooth_gradient'],
788-
extensions=['png'], remove_text=True, tol=0.035)
788+
extensions=['png'], remove_text=True, tol=0.092)
789789
def test_tri_smooth_gradient():
790790
# Image comparison based on example trigradient_demo.
791791

0 commit comments

Comments
 (0)