def Draw_ploy_points(vec):
for pts_dict in vec:
x_values = pts_dict['pts'][:,0] # .tolist()
y_values = pts_dict['pts'][:,1]
# 将点绘制在图上
plt.scatter(x_values, y_values)
# 将点连起来
plt.plot(x_values, y_values)
plt.title("BEV", fontsize=24)
plt.xlabel("X", fontsize=14)
plt.ylabel("Y", fontsize=14)
plt.show()
x_values
[-3.00000000e+01 -2.90000348e+01 -2.80000695e+01 -2.70001043e+01
-2.60001391e+01 -2.50001739e+01 -2.40002086e+01 -2.30002434e+01
-2.20002782e+01 -2.10003130e+01 -2.00003477e+01 -1.90003825e+01
-1.80004173e+01 -1.70004521e+01 -1.60004868e+01 -1.50005216e+01
-1.40005564e+01 -1.30005912e+01 -1.20007315e+01 -1.10013594e+01
-1.00019874e+01 -9.00261542e+00 -8.00324340e+00 -7.00387139e+00
-6.00449937e+00 -5.00512736e+00 -4.00575535e+00 -3.00638333e+00
-2.00701132e+00 -1.00763930e+00 -8.26728918e-03 9.91104725e-01
1.99047674e+00 2.98984875e+00 3.98922077e+00 4.98857657e+00
5.98781256e+00 6.98704855e+00 7.98628454e+00 8.98552053e+00
9.98475652e+00 1.09839925e+01 1.19832285e+01 1.29824645e+01
1.39817005e+01 1.49809365e+01 1.59801725e+01 1.69794084e+01
1.79781262e+01 1.89767803e+01 1.99754345e+01 2.09740886e+01
2.19727427e+01 2.29713968e+01 2.39700510e+01 2.49687051e+01
2.59673592e+01 2.69660134e+01 2.79646675e+01 2.89633216e+01
2.99619757e+01]
y_values
文章来源:https://www.toymoban.com/news/detail-633648.html
[-10.14447545 -10.15281503 -10.1611546 -10.16949418 -10.17783376
-10.18617333 -10.19451291 -10.20285249 -10.21119206 -10.21953164
-10.22787121 -10.23621079 -10.24455037 -10.25288994 -10.26122952
-10.2695691 -10.27790867 -10.28624825 -10.29940701 -10.33484114
-10.37027526 -10.40570939 -10.44114351 -10.47657764 -10.51201177
-10.54744589 -10.58288002 -10.61831414 -10.65374827 -10.68918239
-10.72461652 -10.76005064 -10.79548477 -10.8309189 -10.86635302
-10.90222185 -10.94130429 -10.98038673 -11.01946917 -11.05855161
-11.09763405 -11.13671649 -11.17579893 -11.21488137 -11.25396381
-11.29304626 -11.3321287 -11.37121114 -11.42167787 -11.47354245
-11.52540702 -11.5772716 -11.62913617 -11.68100075 -11.73286533
-11.7847299 -11.83659448 -11.88845905 -11.94032363 -11.9921882
-12.04405278]
文章来源地址https://www.toymoban.com/news/detail-633648.html
到了这里,关于Matplotlib——绘制散点图并连线的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!