Skip to content

Commit 3c156d8

Browse files
committed
Remove mlab.poly_below
1 parent 1981234 commit 3c156d8

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

doc/api/next_api_changes/2018-09-18-DS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ in Matplotlib 2.2 has been removed. See below for a list:
3737
- `mlab.contiguous_regions` (use `.cbook.contiguous_regions` instead)
3838
- `mlab.is_closed_polygon`
3939
- `mlab.poly_between`
40+
- `mlab.poly_below`
4041
- `mlab.donothing_callback`

lib/matplotlib/mlab.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,34 +2686,3 @@ def inside_poly(points, verts):
26862686

26872687
# Check to see which points are contained within the Path
26882688
return [idx for idx, p in enumerate(points) if poly.contains_point(p)]
2689-
2690-
2691-
@cbook.deprecated("2.2")
2692-
def poly_below(xmin, xs, ys):
2693-
"""
2694-
Given a sequence of *xs* and *ys*, return the vertices of a
2695-
polygon that has a horizontal base at *xmin* and an upper bound at
2696-
the *ys*. *xmin* is a scalar.
2697-
2698-
Intended for use with :meth:`matplotlib.axes.Axes.fill`, e.g.,::
2699-
2700-
xv, yv = poly_below(0, x, y)
2701-
ax.fill(xv, yv)
2702-
"""
2703-
if any(isinstance(var, np.ma.MaskedArray) for var in [xs, ys]):
2704-
numpy = np.ma
2705-
else:
2706-
numpy = np
2707-
2708-
xs = numpy.asarray(xs)
2709-
ys = numpy.asarray(ys)
2710-
Nx = len(xs)
2711-
Ny = len(ys)
2712-
if Nx != Ny:
2713-
raise ValueError("'xs' and 'ys' must have the same length")
2714-
x = xmin*numpy.ones(2*Nx)
2715-
y = numpy.ones(2*Nx)
2716-
x[:Nx] = xs
2717-
y[:Nx] = ys
2718-
y[Nx:] = ys[::-1]
2719-
return x, y

lib/matplotlib/pylab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@
235235
frange,
236236
identity, inside_poly, ispower2, isvector, l1norm,
237237
l2norm, log2, movavg, norm_flat,
238-
poly_below,
239238
rec2csv, rec_append_fields, rec_drop_fields, rec_join, rms_flat,
240239
window_hanning, window_none)
241240

0 commit comments

Comments
 (0)