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

Skip to content

Commit 0e99d22

Browse files
committed
Disable contourf slit line removal until problems are fixed.
svn path=/trunk/matplotlib/; revision=7352
1 parent 9ab08da commit 0e99d22

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/matplotlib/contour.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ def _make_paths(segs, kinds):
652652
codes = np.zeros(kind.shape, dtype=mpath.Path.code_type)
653653
codes.fill(mpath.Path.LINETO)
654654
codes[0] = mpath.Path.MOVETO
655-
codes[kind >= _cntr._slitkind] = mpath.Path.MOVETO
655+
# Attempted slit removal is disabled until we get it right.
656+
#codes[kind >= _cntr._slitkind] = mpath.Path.MOVETO
656657
paths.append(mpath.Path(seg, codes))
657658
return paths
658659

src/cntr.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,14 @@ zone_crosser (Csite * site, int level, int pass2)
326326
int z0, z1, z2, z3;
327327
int keep_left = 0; /* flag to try to minimize curvature in saddles */
328328
int done = 0;
329+
int n_kind;
329330

330331
if (level)
331332
level = 2;
332333

333334
for (;;)
334335
{
336+
n_kind = 0;
335337
/* set edge endpoints */
336338
p0 = POINT0 (edge, fwd);
337339
p1 = POINT1 (edge, fwd);
@@ -344,6 +346,7 @@ zone_crosser (Csite * site, int level, int pass2)
344346
xcp[n] = zcp * (x[p1] - x[p0]) + x[p0];
345347
ycp[n] = zcp * (y[p1] - y[p0]) + y[p0];
346348
kcp[n] = kind_zone;
349+
n_kind = n;
347350
}
348351
if (!done && !jedge)
349352
{
@@ -497,9 +500,9 @@ zone_crosser (Csite * site, int level, int pass2)
497500
{
498501
return done;
499502
}
500-
if (pass2 && n > 0)
503+
if (pass2 && n_kind)
501504
{
502-
kcp[n-1] += kind_start_slit;
505+
kcp[n_kind] += kind_start_slit;
503506
}
504507
return slit_cutter (site, done - 5, pass2);
505508
}

0 commit comments

Comments
 (0)