import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import pandas as pd
# 数据准备
data = {
'Initial angle': [16, 10, 4, 16, -5, 11, 10, 6, -9, 22],
'Actual angle': [4, 0, -9, 2, 5, 0, 2, -9, 8, 26],
'Bending angle': [-3, -6, -15, -6, 15, -4, -4, -15, 15, 35],
'Predict angle': [-0.7146432, -8.722968, -13.826502, -8.802077, 10.292447, -8.739363, -6.091443, -14.975991, 14.609785, 30.16992]
}
df = pd.DataFrame(data)
# 创建三维图
fig = plt.figure(figsize=(12, 10))
ax = fig.add_subplot(111, projection='3d')
# 绘制Bending angle和Predict angle的散点图
scatter1 = ax.scatter(df['Initial angle'], df['Actual angle'], df['Bending angle'],
color=
3D图绘制
于 2024-08-07 12:52:17 首次发布