环境和包:
环境
python:python-3.12.0-amd64包:
matplotlib 3.8.2
代码:
# 定义数据列表
data = [{'x': 9000.00, 'y': 0.00, 'z': 28209.83},{'x': 8950.70, 'y': 940.76, 'z': 28209.83},{'x': 8803.33, 'y': 1871.21, 'z': 28209.83},{'x': 8559.51, 'y': 2781.15, 'z': 28209.83},{'x': 8221.91, 'y': 3660.63, 'z': 28209.83},{'x': 7794.23, 'y': 4500.00, 'z': 28209.83},{'x': 7281.15, 'y': 5290.07, 'z': 28209.83},{'x': 6688.30, 'y': 6022.18, 'z': 28209.83},{'x': 6022.18, 'y': 6688.30, 'z': 28209.83},{'x': 5290.07, 'y': 7281.15, 'z': 28209.83},{'x': 4500.00, 'y': 7794.23, 'z': 28209.83},{'x': 3660.63, 'y': 8221.91, 'z': 28209.83},{'x': 2781.15, 'y': 8559.51, 'z': 28209.83},{'x': 1871.21, 'y': 8803.33, 'z': 28209.83},{'x': 940.76, 'y': 8950.70, 'z': 28209.83},{'x': 0.00, 'y': 9000.00, 'z': 28209.83},{'x': -940.76, 'y': 8950.70, 'z': 28209.83},{'x': -1871.21, 'y': 8803.33, 'z': 28209.83},{'x': -2781.15, 'y': 8559.51, 'z': 28209.83},{'x': -3660.63, 'y': 8221.91, 'z': 28209.83},{'x': -4500.00, 'y': 7794.23, 'z': 28209.83},{'x': -5290.07, 'y': 7281.15, 'z': 28209.83},{'x': -6022.18, 'y': 6688.30, 'z': 28209.83},{'x': -6688.30, 'y': 6022.18, 'z': 28209.83},{'x': -7281.15, 'y': 5290.07, 'z': 28209.83},{'x': -7794.23, 'y': 4500.00, 'z': 28209.83},{'x': -8221.91, 'y': 3660.63, 'z': 28209.83},{'x': -8559.51, 'y': 2781.15, 'z': 28209.83},{'x': -8803.33, 'y': 1871.21, 'z': 28209.83},{'x': -8950.70, 'y': 940.76, 'z': 28209.83},{'x': -9000.00, 'y': 0.00, 'z': 28209.83},{'x': -8950.70, 'y': -940.76, 'z': 28209.83},{'x': -8803.33, 'y': -1871.21, 'z': 28209.83},{'x': -8559.51, 'y': -2781.15, 'z': 28209.83},{'x': -8221.91, 'y': -3660.63, 'z': 28209.83},{'x': -7794.23, 'y': -4500.00, 'z': 28209.83},{'x': -7281.15, 'y': -5290.07, 'z': 28209.83},{'x': -6688.30, 'y': -6022.18, 'z': 28209.83},{'x': -6022.18, 'y': -6688.30, 'z': 28209.83},{'x': -5290.07, 'y': -7281.15, 'z': 28209.83},{'x': -4500.00, 'y': -7794.23, 'z': 28209.83},{'x': -3660.63, 'y': -8221.91, 'z': 28209.83},{'x': -2781.15, 'y': -8559.51, 'z': 28209.83},{'x': -1871.21, 'y': -8803.33, 'z': 28209.83},{'x': -940.76, 'y': -8950.70, 'z': 28209.83},{'x': -0.00, 'y': -9000.00, 'z': 28209.83},{'x': 940.76, 'y': -8950.70, 'z': 28209.83},{'x': 1871.21, 'y': -8803.33, 'z': 28209.83},{'x': 2781.15, 'y': -8559.51, 'z': 28209.83},{'x': 3660.63, 'y': -8221.91, 'z': 28209.83},{'x': 4500.00, 'y': -7794.23, 'z': 28209.83},{'x': 5290.07, 'y': -7281.15, 'z': 28209.83},{'x': 6022.18, 'y': -6688.30, 'z': 28209.83},{'x': 6688.30, 'y': -6022.18, 'z': 28209.83},{'x': 7281.15, 'y': -5290.07, 'z': 28209.83},{'x': 7794.23, 'y': -4500.00, 'z': 28209.83},{'x': 8221.91, 'y': -3660.63, 'z': 28209.83},{'x': 8559.51, 'y': -2781.15, 'z': 28209.83},{'x': 8803.33, 'y': -1871.21, 'z': 28209.83},{'x': 8950.70, 'y': -940.76, 'z': 28209.83}
]# 将数据转换为所需格式
#result1 = [{'Column 1': d['x'], 'Column 2': d['y'], 'Column 3': d['z']} for d in data]
result = [{"Column 1": d['x'], "Column 2": d['y'], "Column 3": d['z']} for d in data]
result = [str(result)]# 输出结果
print(result)
效果图: