Skip to content

Commit a187c80

Browse files
petebachantscls19fr
authored andcommitted
Remove use of pylab.poly_between (#114)
1 parent e816aa8 commit a187c80

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

windrose/windrose.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from matplotlib.projections.polar import PolarAxes
1212
from numpy.lib.twodim_base import histogram2d
1313
import matplotlib.pyplot as plt
14-
from pylab import poly_between
1514

1615
ZBASE = -1000 # The starting zorder for all drawing, negative to have the grid on
1716
VAR_DEFAULT = "speed"
@@ -504,15 +503,9 @@ def contourf(self, direction, var, **kwargs):
504503
val = vals[i, :] + offset
505504
offset += vals[i, :]
506505
zorder = ZBASE + nbins - i
507-
xs, ys = poly_between(angles, 0, val)
508-
patch = self.fill(
509-
xs,
510-
ys,
511-
facecolor=colors[i],
512-
edgecolor=colors[i],
513-
zorder=zorder,
514-
**kwargs
515-
)
506+
patch = self.fill(np.append(angles, 0), np.append(val, 0),
507+
facecolor=colors[i], edgecolor=colors[i],
508+
zorder=zorder, **kwargs)
516509
self.patches_list.extend(patch)
517510
self._update()
518511

0 commit comments

Comments
 (0)