Skip to content

Commit 5940538

Browse files
committed
Remove dregs of nxutils
1 parent 9e0dd74 commit 5940538

File tree

4 files changed

+0
-362
lines changed

4 files changed

+0
-362
lines changed

doc/faq/howto_faq.rst

-47
Original file line numberDiff line numberDiff line change
@@ -281,53 +281,6 @@ to achieve the desired plot::
281281

282282
plt.show()
283283

284-
.. _point-in-poly:
285-
286-
Test whether a point is inside a polygon
287-
----------------------------------------
288-
289-
The :mod:`~matplotlib.nxutils` provides two high-performance methods:
290-
for a single point use :func:`~matplotlib.nxutils.pnpoly` and for an
291-
array of points use :func:`~matplotlib.nxutils.points_inside_poly`.
292-
For a discussion of the implementation see `pnpoly
293-
<http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html>`_.
294-
295-
.. sourcecode:: ipython
296-
297-
In [25]: import numpy as np
298-
299-
In [26]: import matplotlib.nxutils as nx
300-
301-
In [27]: verts = np.array([ [0,0], [0, 1], [1, 1], [1,0]], float)
302-
303-
In [28]: nx.pnpoly( 0.5, 0.5, verts)
304-
Out[28]: 1
305-
306-
In [29]: nx.pnpoly( 0.5, 1.5, verts)
307-
Out[29]: 0
308-
309-
In [30]: points = np.random.rand(10,2)*2
310-
311-
In [31]: points
312-
Out[31]:
313-
array([[ 1.03597426, 0.61029911],
314-
[ 1.94061056, 0.65233947],
315-
[ 1.08593748, 1.16010789],
316-
[ 0.9255139 , 1.79098751],
317-
[ 1.54564936, 1.15604046],
318-
[ 1.71514397, 1.26147554],
319-
[ 1.19133536, 0.56787764],
320-
[ 0.40939549, 0.35190339],
321-
[ 1.8944715 , 0.61785408],
322-
[ 0.03128518, 0.48144145]])
323-
324-
In [32]: nx.points_inside_poly(points, verts)
325-
Out[32]: array([False, False, False, False, False, False, False, True, False, True], dtype=bool)
326-
327-
.. htmlonly::
328-
329-
For a complete example, see :ref:`event_handling-lasso_demo`.
330-
331284
.. _howto-set-zorder:
332285

333286
Control the depth of plot elements

src/nxutils.c

-254
This file was deleted.

unit/inside_poly_memleak.py

-30
This file was deleted.

unit/inside_poly_profile.py

-31
This file was deleted.

0 commit comments

Comments
 (0)