make_images.py 文件源码

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

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

    ax = curve.plot(256)
    ax.lines[-1].zorder = 1

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

    # Set the axis bounds / scaling.
    ax.axis('scaled')
    ax.set_xlim(-0.125, 6.125)
    ax.set_ylim(-3.125, 3.125)

    save_image(ax.figure, 'newton_refine_curve_cusp.png')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号