From 879fa77ed3dbf9b52ad1d5f47458d6983aaadd56 Mon Sep 17 00:00:00 2001 From: jens Date: Tue, 28 Jun 2022 20:19:38 +0200 Subject: [PATCH] - improved plot --- components/pid/kalman_eval.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/components/pid/kalman_eval.py b/components/pid/kalman_eval.py index 562982c..4a1480a 100644 --- a/components/pid/kalman_eval.py +++ b/components/pid/kalman_eval.py @@ -4,7 +4,7 @@ from matplotlib.pyplot import plot, figure, subplot, legend, grid, show T_true = 72 T_est = 68 -E_est = 2 +E_est = 4 E_mea = 2 _t = np.empty(0) @@ -33,12 +33,16 @@ for t in range(0, 10000): _E_est = np.append(_E_est, E_est) figure(1) -subplot(2, 1, 1) +subplot(3, 1, 1) plot(_t, _T_est, 'b-', _t, _T_true, '-r', linewidth=1) legend(["T_est", "T_true"]) grid(True) -subplot(2, 1, 2) -plot(_t, _E_est, 'b-', _t, _KG, '-r', linewidth=1) -legend(["E_est", "KG"]) +subplot(3, 1, 2) +plot(_t, _E_est, 'b-', linewidth=1) +legend(["E_est"]) +grid(True) +subplot(3, 1, 3) +plot(_t, _KG, '-r', linewidth=1) +legend(["KG"]) grid(True) show()