Commit 6744e717 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Adds a plot

Showing with 2 additions and 2 deletions
+2 -2
......@@ -9,7 +9,7 @@ k._vab_pulse(vab=12, length=1., sampling_rate=10., polarity=1)
r = k.readings[:,2]/k.readings[:,1]
print(f'Mean resistance: {np.mean(r):.3f} Ohms, Dev. {100*np.std(r)/np.mean(r):.1f} %')
fig, ax = plt.subplots()
ax.plot(r[:,0], r[:, 1], '-r', label='current')
ax.plot(k.readings[:,0], k.readings[:, 1], '-r', label='current')
ax2 = ax.twinx()
ax.plot(r[:,0], r[:, 2], '-b', label='voltage')
ax.plot(k.readings[:,0], k.readings[:, 2], '-b', label='voltage')
change_config('config_default.py', verbose=False)
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