def printPolyLens(polygons=None): import ygmapbits as yg if polygons == None: polygons = yg.getReducedPolys() # i = 0 for ply in polygons: print("poly(%d): %d" % (i, len(ply))) i += 1 return None
def printPolyLens(polygons=None): import ygmapbits as yg if polygons==None: polygons=yg.getReducedPolys() # i=0 for ply in polygons: print("poly(%d): %d" % (i, len(ply))) i+=1 return None
def plotPolygons(polygons=None): import ygmapbits as yg # getPIsquareRays if polygons==None: polygons=yg.getReducedPolys() #if polygons==None: polygons=getPIsquareRays() # plt.figure(0) for ply in polygons: #if len(ply)<5: continue plt.fill(list(map(operator.itemgetter(1), ply)), list(map(operator.itemgetter(0),ply)), '.-') plt.show() return polygons
def plotPolygons(polygons=None): import ygmapbits as yg # getPIsquareRays if polygons==None: polygons=yg.getReducedPolys() #if polygons==None: polygons=getPIsquareRays() # plt.figure(0) for ply in polygons: #if len(ply)<5: continue plt.fill(map(operator.itemgetter(1), ply), map(operator.itemgetter(0),ply), '.-') plt.show() return polygons