pughpoints.py 文件源码

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

项目:nanopores 作者: mitschabaude 项目源码 文件源码
def plot_polygon(ax, polygon):
    settings = dict(closed=True, facecolor="#eeeeee", linewidth=1.,
                    edgecolor="black")
    polygon = np.array(polygon)
    polygon_m = np.column_stack([-polygon[:,0], polygon[:,1]])

    patch = patches.Polygon(polygon, **settings)
    patchm = patches.Polygon(polygon_m, **settings)
    #patch.set_zorder(10)
    #patchm.set_zorder(10)
    ax.add_patch(patch)
    ax.add_patch(patchm)

# will result in roughly nz * nr*(nr+1)/2 points
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号