File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1429,27 +1429,17 @@ def inside_poly(points, verts):
14291429 res , = np .nonzero (nxutils .points_inside_poly (points , verts ))
14301430 return res
14311431
1432- def poly_below (xmin , xs , ys ):
1432+ def poly_below (ymin , xs , ys ):
14331433 """
14341434 given a sequence of xs and ys, return the vertices of a polygon
1435- that has a horzontal base at xmin and an upper bound at the ys.
1436- xmin is a scalar.
1435+ that has a horzintal base at ymin and an upper bound at the ys.
1436+ ymin is a scalar, and xs and ys are arrays
14371437
14381438 intended for use with Axes.fill, eg
14391439 xv, yv = poly_below(0, x, y)
14401440 ax.fill(xv, yv)
14411441 """
1442- xs = np .asarray (xs )
1443- ys = np .asarray (ys )
1444- Nx = len (xs )
1445- Ny = len (ys )
1446- assert (Nx == Ny )
1447- x = xmin * np .ones (2 * Nx )
1448- y = np .ones (2 * Nx )
1449- x [:Nx ] = xs
1450- y [:Nx ] = ys
1451- y [Nx :] = ys [::- 1 ]
1452- return x , y
1442+ return poly_between (xs , ys , xmin )
14531443
14541444
14551445def poly_between (x , ylower , yupper ):
You can’t perform that action at this time.
0 commit comments