diff options
-rwxr-xr-x | bin/msp430-etv | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/msp430-etv b/bin/msp430-etv index 442f637..afe885f 100755 --- a/bin/msp430-etv +++ b/bin/msp430-etv @@ -286,9 +286,9 @@ if __name__ == '__main__': if 'plot' in opt: # nA * mV = pW - pwrhandle, = plt.plot(data[:, 0], data[:, 1] * data[:, 2] * 1e-12, 'b-', label='U*I', markersize=1) - energyhandle, = plt.plot(data[1:, 0], ((data[1:, 3] - data[:-1, 3]) * 1e-9) / ((data[1:, 0] - data[:-1, 0]) * 1e-6), 'r-', label='E/Δt', markersize=1) - plt.legend(handles=[pwrhandle]) + pwrhandle, = plt.plot(data[:, 0] * 1e-6, data[:, 1] * data[:, 2] * 1e-12, 'b-', label='P=U*I', markersize=1) + energyhandle, = plt.plot(data[1:, 0] * 1e-6, ((data[1:, 3] - data[:-1, 3]) * 1e-9) / ((data[1:, 0] - data[:-1, 0]) * 1e-6), 'r-', label='P=ΔE/Δt', markersize=1) + plt.legend(handles=[pwrhandle, energyhandle]) plt.xlabel('Time [s]') plt.ylabel('Power [W]') plt.grid(True) |