Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd388d2f

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

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+
importsys
5+
46
importnumpyasnp
57
fromnumpy.testingimportassert_array_almost_equal
68
importmatplotlib.pyplotasplt
79
frommatplotlib.testing.decoratorsimportimage_comparison
810
importmatplotlib.transformsasmtransforms
911

1012

13+
on_win= (sys.platform=='win32')
14+
15+
1116
defvelocity_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
deftest_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.04ifon_winelse0)
5864
deftest_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
deftest_tri_smooth_gradient():
790790
# Image comparison based on example trigradient_demo.
791791

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp