Add files via upload

This commit is contained in:
suixin1424
2024-01-23 21:20:44 +08:00
committed by GitHub
parent c5ce176bdc
commit 2a9f28437b

25
show.py Normal file
View File

@@ -0,0 +1,25 @@
import matplotlib.pyplot as plt
import torch
# 您的tensor数据
points = torch.tensor([
[ 0.4762, 0.9082],
[ -31.5831, -39.9315],
[ -52.1844, -71.0071],
[ -60.4211, -83.4873],
[ -69.3365, -100.6035],
[ -80.3101, -110.0435],
[ -86.7765, -120.0472],
[ -93.2574, -127.8565],
[ -98.5992, -135.3300]
])
# 提取x和y坐标
x = points[:, 0].tolist()
y = points[:, 1].tolist()
# 绘制散点图
plt.scatter(x, y)
# 显示图形
plt.show()