python绘制3D散点图, 采用matplotlib库;

包引入:

import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d as p3d
import numpy as np
    fig = plt.figure()
    ax = p3d.Axes3D(fig)          // 这一个非常关键;
    np.meshgrid()
    x = list(range(0, grayImg.shape[0]))
    y = list(range(0, grayImg.shape[1]))
    X, Y = np.meshgrid(x, y)       // X,Y;
    z = imgCornor.reshape(grayImg.shape[0] * grayImg.shape[1])
    ax.scatter(X, Y, z, c='b', s=10, alpha=0.05)
    plt.show()

 

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2021-10-14
  • 2021-11-17
  • 2021-11-29
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-09-17
  • 2021-11-29
  • 2021-12-14
  • 2021-07-22
  • 2021-04-12
  • 2021-12-15
相关资源
相似解决方案