make_images.py 文件源码

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

项目:bezier 作者: dhermes 项目源码 文件源码
def newton_refine2(s_vals, curve1, curve2):
    """Image for :func:`.newton_refine` docstring."""
    if NO_IMAGES:
        return

    ax = curve1.plot(256)
    ax.lines[-1].zorder = 1
    curve2.plot(256, ax=ax)
    ax.lines[-1].zorder = 1

    points = curve1.evaluate_multi(np.asfortranarray(s_vals))
    colors = seaborn.dark_palette('blue', 5)
    ax.scatter(points[:, 0], points[:, 1], c=colors,
               s=20, alpha=0.75, zorder=2)

    ax.axis('scaled')
    ax.set_xlim(0.0, 1.0)
    ax.set_ylim(0.0, 1.0)
    save_image(ax.figure, 'newton_refine2.png')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号