diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-04 15:42:03 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-11-04 15:42:03 +0100 |
commit | 6d7f8521fa69546afd23764b8d4c643918514345 (patch) | |
tree | a6bc8944ad4d36af73e64791f0f072ac0f861056 /bin | |
parent | 3be77b35f1dfb4b2f90712974c3de71c1e088884 (diff) |
Update legend
Diffstat (limited to 'bin')
-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) |