plotutil.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:hylaa 作者: stanleybak 项目源码 文件源码
def add_waiting_list_poly(self, poly_verts, mode_name):
        '''add a polygon on the waiting list'''

        polys = self.waiting_list_mode_to_polys.get(mode_name)

        if polys is None:
            face_col, edge_col = self.mode_colors.get_edge_face_colors(mode_name)

            polys = collections.PolyCollection([], lw=2, animated=True, alpha=0.3,
                                               edgecolor=edge_col, facecolor=face_col)
            self.axes.add_collection(polys)
            self.waiting_list_mode_to_polys[mode_name] = polys

        paths = polys.get_paths()

        codes = [Path.MOVETO] + [Path.LINETO] * (len(poly_verts) - 2) + [Path.CLOSEPOLY]
        paths.append(Path(poly_verts, codes))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号