Commit 43c5aa4c authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Increase plot size, auto-save as .jpeg

parent 7a3a58f8
...@@ -16,16 +16,17 @@ if __name__ == '__main__': ...@@ -16,16 +16,17 @@ if __name__ == '__main__':
pos = (data[...,18:32] - data[0,18:32]) * 180 / math.pi pos = (data[...,18:32] - data[0,18:32]) * 180 / math.pi
torque = (data[...,32:39] - data[0,32:39]) torque = (data[...,32:39] - data[0,32:39])
for i in range(0,7): for i in range(0,7):
n = 4500 - 500 * (i + 1) n = int(6.5/(i + 1)*1000)
cut = slice(1000,1000+n) cut = slice(1000,1000+n)
f, axarr = plt.subplots(3, sharex=True) f, axarr = plt.subplots(3, sharex=True)
f.set_size_inches(15, 12)
axarr[0].set_title(r'$K_p^{act}-K_p^{ref}$') axarr[0].set_title(r'$K_p^{act}-K_p^{ref}$')
axarr[0].plot(seq[cut],(kp[...,i*2]-kp[...,i*2+1])[cut]) axarr[0].plot(seq[cut],(kp[...,i*2]-kp[...,i*2+1])[cut])
axarr[1].set_title('$pos^{act}-pos^{ref}$') axarr[1].set_title('$pos^{act}-pos^{ref}$')
axarr[1].plot(seq[cut],(pos[...,i*2]-pos[...,i*2+1])[cut]) axarr[1].plot(seq[cut],(pos[...,i*2]-pos[...,i*2+1])[cut])
axarr[2].set_title(r'Torque [Nm]') axarr[2].set_title(r'Torque [Nm]')
axarr[2].plot(seq[cut],torque[...,i][cut]) axarr[2].plot(seq[cut],torque[...,i][cut])
f.savefig('axis_%d_%s.jpg' % (i + 1, sys.argv[1]))
plt.show() plt.show()
Supports Markdown
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