1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

pythonでプロットしてみる#1

Last updated at Posted at 2022-02-26

RPLiDARで取得したx,y,z座標の情報をmatplotlibで散布図として表示してみたい

データの取得は前回の”二次元データの並び替え”を参照してほしい

実際にプロットしてみる

pts.py
import matplotlib.pyplot as plt
import math
for i in range(len(x_list)):
    plt.plot(float(x_list[i]),float(y_list[i]),marker='*')
plt.xlim(0,math.ceil(float(max(x_list))))
plt.ylim(0,math.ceil(float(max(y_list))))
plt.title('Title',fontsize=15)
plt.xlabel('X',fontsize=10)
plt.ylabel('Y',fontsize=10)

実際にプロットした結果

pts.jpg

ちゃんと指定した点の形でプロットされている!

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?