More copy edits, updated for filterpy 0.1.2

This commit is contained in:
Roger Labbe
2016-01-24 12:11:39 -08:00
parent 49f604be52
commit d5ea503fde
9 changed files with 812 additions and 999 deletions

View File

@@ -60,7 +60,7 @@ def print_results(estimates, prediction, weight):
def create_predict_update_chart(box_bg = '#CCCCCC',
arrow1 = '#88CCFF',
arrow2 = '#88FF88'):
plt.figure(figsize=(4,4), facecolor='w')
plt.figure(figsize=(3,3), facecolor='w')
ax = plt.axes((0, 0, 1, 1),
xticks=[], yticks=[], frameon=False)
#ax.set_xlim(0, 10)
@@ -123,7 +123,7 @@ def create_predict_update_chart(box_bg = '#CCCCCC',
ha='center', va='center', fontsize=18)
plt.axis('equal')
#plt.axis([0,8,0,8])
plt.show()
#plt.show()
def plot_estimate_chart_1():

View File

@@ -36,11 +36,11 @@ def plot_dog_track(xs, dog, measurement_var, process_var):
def print_gh(predict, update, z):
predict_template = ' {: 7.3f} {: 8.3f}'
update_template = '{: 7.3f} {: 7.3f}\t {:.3f}'
predict_template = '{: 7.3f} {: 8.3f}'
update_template = '{:.3f}\t{: 7.3f} {: 7.3f}'
print(predict_template.format(predict[0], predict[1]),end='\t')
print(update_template.format(update[0], update[1], z))
print(update_template.format(z, update[0], update[1]))
def print_variance(positions):

View File

@@ -181,8 +181,8 @@ def show_position_prediction_chart():
plt.xlim([0,5])
plt.ylim([0,5])
plt.xlabel("Position")
plt.ylabel("Time")
plt.xlabel("X")
plt.ylabel("Y")
plt.xticks(np.arange(1,5,1))
plt.yticks(np.arange(1,5,1))
@@ -417,27 +417,27 @@ def plot_3_covariances():
plt.gca().grid(b=False)
plt.gca().set_xticks([0,1,2,3,4])
plot_covariance_ellipse((2, 7), cov=P, facecolor='g', alpha=0.2,
title='|2 0|\n|0 2|', axis_equal=False)
plt.ylim((4, 10))
title='|2 0|\n|0 2|', std=[1,2,3], axis_equal=False)
plt.ylim((0, 15))
plt.gca().set_aspect('equal', adjustable='box')
plt.subplot(132)
plt.gca().grid(b=False)
plt.gca().set_xticks([0,1,2,3,4])
P = [[2, 0], [0, 9]]
plt.ylim((4, 10))
P = [[2, 0], [0, 6]]
plt.ylim((0, 15))
plt.gca().set_aspect('equal', adjustable='box')
plot_covariance_ellipse((2, 7), P, facecolor='g', alpha=0.2,
axis_equal=False, title='|2 0|\n|0 9|')
std=[1,2,3],axis_equal=False, title='|2 0|\n|0 6|')
plt.subplot(133)
plt.gca().grid(b=False)
plt.gca().set_xticks([0,1,2,3,4])
P = [[2, 1.2], [1.2, 2]]
plt.ylim((4, 10))
plt.ylim((0, 15))
plt.gca().set_aspect('equal', adjustable='box')
plot_covariance_ellipse((2, 7), P, facecolor='g', alpha=0.2,
axis_equal=False,
axis_equal=False,std=[1,2,3],
title='|2 1.2|\n|1.2 2|')
plt.tight_layout()