Re: [Matplotlib-users] matplotlib pnpoly-example-results-in-error

2013-05-12 Thread Cameron Hayne
On 2013-05-09, at 3:55 PM, algotr8der wrote: > Apparently, nxutils is deprecated, which to me means it should still work > but a user on stackoverflow pointed out that there may be some code rot. > That said, the documentation on matplotlib.path.Path.contains_point is weak > (see below). Does any

Re: [Matplotlib-users] matplotlib pnpoly-example-results-in-error

2013-05-10 Thread Nicolas Rougier
>From the matplotlib page, you can reach: http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html and just translates the function: def inside_polygon(p, vertices): vx,vy = vertices[:,0], vertices[:,1] x,y = p c = 0 j = len(vertices)-1 for i in xrange(len(verti

Re: [Matplotlib-users] matplotlib pnpoly-example-results-in-error

2013-05-09 Thread algotr8der
I tried to execute the following code: http://matplotlib.org/faq/howto_faq.html#test-whether-a-point-is-inside-a-polygon However I get errors I describe here: http://stackoverflow.com/questions/16452509/matplotlib-pnpoly-example-results-in-error >>>import numpy as np >>>import matplotlib.nxutil