Commit 138d20dd authored by gxiang's avatar gxiang
Browse files

fix plot

parent fafe88d0
......@@ -33,6 +33,7 @@ for event in log:
cmd = data[:,3]
start = np.where(cmd>=0.1)[0][0]-5
end = start + 500 #plot 10s worth of data
p1 = plt.plot(data[start:end,0], data[start:end,3], 'g', label="vel cmd")
p2 = plt.plot(data[start:end,0], data[start:end,1], 'r', label="pwm cmd")
p3 = plt.plot(data[start:end,0], data[start:end,5], 'b', label="velocity")
......@@ -40,3 +41,8 @@ plt.legend(loc="upper right")
filename, file_extension = os.path.splitext(file)
plt.savefig(filename + '.png')
p1 = plt.plot(data[start:end,0], data[start:end,4], 'g', label="vel cmd")
p2 = plt.plot(data[start:end,0], data[start:end,2], 'r', label="pwm cmd")
p3 = plt.plot(data[start:end,0], data[start:end,6], 'b', label="velocity")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment