plot.py 文件源码

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

项目:BERNAISE 作者: gautelinga 项目源码 文件源码
def plot_edges(pts, edges, title=None, clabel=None,
               save=None, show=True):
    nppts = np.array(pts)
    npedges = np.array(edges)
    lc = LineCollection(nppts[npedges])

    fig = Figure(title=title, clabel=clabel, save=save, show=show)
    fig.ax.add_collection(lc)
    plt.xlim(nppts[:, 0].min(), nppts[:, 0].max())
    plt.ylim(nppts[:, 1].min(), nppts[:, 1].max())
    plt.plot(nppts[:, 0], nppts[:, 1], 'ro')
    return fig
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号