import
网页链接 as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
# 生成数据集
x1 = np.array([1, 2, 3, 4, 5, 6])
x2 = np.array([1, 2, 3, 4, 5, 6])
x3 = np.array([1, 2, 3, 4, 5, 6])
y = -5288 + 1.75 * x1 + 2050 * x2 + 4.09 * x3
# 绘制三维散点图
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x1, x2, x3, c=y, cmap='cool')
ax.set_xlabel('x1')
ax.set_ylabel('x2')
ax.set_zlabel('x3')
plt.show()


让GPT帮你吧。