v5.9
This commit is contained in:
22
c_cpp/draw.py
Normal file
22
c_cpp/draw.py
Normal file
@ -0,0 +1,22 @@
|
||||
import numpy as np
|
||||
import random
|
||||
import math
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
cnt = np.zeros(500)
|
||||
for t in range(0,500):
|
||||
cnt[t] = t
|
||||
xt = np.zeros(500)
|
||||
vx = np.loadtxt("D:/speed1x.csv",delimiter=",", dtype=float)
|
||||
vy = np.loadtxt("D:/speed1y.csv",delimiter=",", dtype=float)
|
||||
vz = np.loadtxt("D:/speed1z.csv",delimiter=",", dtype=float)
|
||||
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
|
||||
plt.xlabel('时间')
|
||||
plt.ylabel('每个时间段x方向位移')
|
||||
for i in range(0,35):
|
||||
xt = np.zeros(500)
|
||||
for j in range(0,500):
|
||||
xt[j] = vz[i,j]
|
||||
plt.plot(cnt,xt)
|
||||
|
||||
plt.show()
|
||||
Reference in New Issue
Block a user