adasurf_multithreading.py 文件源码

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

项目:PyGeo 作者: CalvinNeo 项目源码 文件源码
def paint_surf(a, b, c, points=None):
    fig = pl.figure()
    ax = fig.add_subplot(111, projection='3d')
    X = np.arange(-1, 1, 0.05)
    Y = np.arange(-1, 1, 0.05)
    X, Y = np.meshgrid(X, Y)
    Z = -(X*a + Y*b + c)
    surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm, linewidth=0, antialiased=False)
    ax.set_zlim(-1.01, 1.01)
    ax.zaxis.set_major_locator(LinearLocator(10))
    ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
    fig.colorbar(surf, shrink=0.5, aspect=5)
    if points != None:
        x1 = points[:, 0]
        y1 = points[:, 1]
        z1 = points[:, 2]
        ax.scatter(x1, y1, z1, c='r')
        pl.show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号