Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
96129 views
1
# -*- coding: utf-8 -*-
2
"""
3
Created on Tue Jun 30 19:48:21 2015
4
5
@author: rlabbe
6
"""
7
8
import matplotlib.pyplot as plt
9
import book_plots as bp
10
11
12
def plot_track_and_residuals(t, xs, z_xs, res):
13
plt.subplot(121)
14
bp.plot_measurements(t, z_xs, label='z')
15
bp.plot_filter(t, xs)
16
plt.legend(loc=2)
17
plt.xlabel('time (sec)')
18
plt.ylabel('X')
19
plt.title('estimates vs measurements')
20
plt.subplot(122)
21
# plot twice so it has the same color as the plot to the left!
22
plt.plot(t, res)
23
plt.plot(t, res)
24
plt.xlabel('time (sec)')
25
plt.ylabel('residual')
26
plt.title('residuals')
27
plt.show()
28
29
30
31
32