Did I find the right examples for you? yes no

All Samples(62)  |  Call(47)  |  Derive(0)  |  Import(15)

src/m/a/matplotlib-ancient-HEAD/examples/event_handling/lasso_demo.py   matplotlib-ancient(Download)
from matplotlib.widgets import Lasso
import matplotlib.mlab
from matplotlib.nxutils import points_inside_poly
from matplotlib.colors import colorConverter
from matplotlib.collections import RegularPolyCollection
    def callback(self, verts):
        facecolors = self.collection.get_facecolors()
        ind = nonzero(points_inside_poly(self.xys, verts))[0]
        for i in range(self.Nxy):
            if i in ind:

src/m/a/matplotlib-ancient-HEAD/unit/inside_poly_memleak.py   matplotlib-ancient(Download)
        verts = rand(100, 2)
        points = rand(10000,2)
        mask = nxutils.points_inside_poly(points, verts)
 
 

src/o/p/OpenElectrophy-0.3.3/OpenElectrophy/gui/spikesorting/ndviewer.py   OpenElectrophy(Download)
from matplotlib.patches import Polygon, Circle
from matplotlib.widgets import Lasso
from matplotlib.nxutils import points_inside_poly
from matplotlib.cm import get_cmap
 
    def stopLasso(self, verts):
        self.actualSelection  = points_inside_poly(np.dot( self.data, self.projection ), verts)
        self.canvas.widgetlock.release(self.lasso)
        del self.lasso
        self.selection_changed.emit()
            self.redraw()
 
        self.actualSelection = points_inside_poly(np.dot( self.data, self.projection ), self.poly.xy)
        self.selection_changed.emit()
 
        self.redraw()
 
        self.actualSelection = points_inside_poly(np.dot( self.data, self.projection ), self.poly.xy)
        self.selection_changed.emit()
 

src/p/s/psychopy-HEAD/psychopy/visual/helpers.py   psychopy(Download)
        else:
            try: # deprecated in matplotlib 1.2
                if any(nxutils.points_inside_poly(poly1, poly2)):
                    return True
                return any(nxutils.points_inside_poly(poly2, poly1))

src/m/a/matplotlib-HEAD/unit/inside_poly_memleak.py   matplotlib(Download)
        verts = rand(100, 2)
        points = rand(10000,2)
        mask = nxutils.points_inside_poly(points, verts)
 
 

src/a/s/Astropysics-0.1.dev-r1178/astropysics/plotting.py   Astropysics(Download)
    def callback(verts):
        from matplotlib.nxutils import points_inside_poly
 
        xy = np.array((x,y)).T
        inds = np.nonzero(points_inside_poly(xy,verts))[0]
    def callback(self,verts):
        from matplotlib.nxutils import points_inside_poly
 
 
        inds=[]
        for xy in self.xys:
            inds.append(np.nonzero(points_inside_poly(xy,verts))[0])

src/a/s/astropysics-HEAD/astropysics/plotting.py   astropysics(Download)
    def callback(verts):
        from matplotlib.nxutils import points_inside_poly
 
        xy = np.array((x,y)).T
        inds = np.nonzero(points_inside_poly(xy,verts))[0]
    def callback(self,verts):
        from matplotlib.nxutils import points_inside_poly
 
 
        inds=[]
        for xy in self.xys:
            inds.append(np.nonzero(points_inside_poly(xy,verts))[0])

src/s/e/SEDFitting-HEAD/python/tools/figure.py   SEDFitting(Download)
#============================ LASSO PLOT ==============================
from matplotlib.widgets import Lasso
from matplotlib.nxutils import points_inside_poly
from numpy import nonzero,array
 
    def callback(self, verts):
        mask = points_inside_poly(self.xys, verts)
        ind = nonzero(mask)[0]
        self.canvas.draw_idle()
        self.canvas.widgetlock.release(self.lasso)
    def inside(self, xs,ys):
        tmpxys = zip(xs,ys)
        return points_inside_poly(tmpxys, self.verts)
 
    def onpress(self, event):

src/n/u/nupic-HEAD/external/linux32/lib/python2.6/site-packages/matplotlib/mlab.py   nupic(Download)
    that are inside the polygon
    """
    res, =  np.nonzero(nxutils.points_inside_poly(points, verts))
    return res
 
    that are inside the polygon.
    """
    res, =  np.nonzero(nxutils.points_inside_poly(points, verts))
    return res
 

src/d/i/dimarray-0.1.7/dimarray/geo/region.py   dimarray(Download)
	lon, lat: arrays of longitude and latitude
	"""
	from matplotlib.nxutils import points_inside_poly as inpoly
	lon = np.asarray(lon)
	lat = np.asarray(lat)
	xypoints = np.vstack((lon.flatten(), lat.flatten())).T
	xyvertices = np.asarray(self.to_shapely().exterior.xy).T # contours of the polynom
	mask = inpoly(xypoints, xyvertices)
	return mask.reshape(lon.shape)
	#region = np.zeros_like(lon, dtype=bool)

  1 | 2 | 3 | 4  Next