@@ -48,7 +48,7 @@ def plot_hypothesis2():
48
48
plt .errorbar (range (1 , 11 ), [169 , 170 , 169 ,171 , 170 , 171 , 169 , 170 , 169 , 170 ],
49
49
xerr = 0 , yerr = 6 , fmt = 'bo' , capthick = 2 , capsize = 10 )
50
50
plt .plot ([1 , 10 ], [169 , 170.5 ], color = 'g' , ls = '--' )
51
-
51
+
52
52
plt .xlim (0 , 11 )
53
53
plt .ylim (150 , 185 )
54
54
plt .xlabel ('day' )
@@ -89,7 +89,7 @@ def plot_hypothesis4():
89
89
book_plots .show_legend ()
90
90
plt .grid (False )
91
91
92
-
92
+
93
93
def plot_hypothesis5 ():
94
94
weights = [158.0 , 164.2 , 160.3 , 159.9 , 162.1 , 164.6 ,
95
95
169.6 , 167.4 , 166.4 , 171.0 , 171.2 , 172.6 ]
@@ -108,8 +108,8 @@ def plot_hypothesis5():
108
108
plt .ylabel ('weight (lbs)' )
109
109
book_plots .show_legend ()
110
110
plt .grid (False )
111
-
112
-
111
+
112
+
113
113
def plot_estimate_chart_1 ():
114
114
with figsize (y = 2.5 ):
115
115
plt .figure ()
@@ -179,7 +179,7 @@ def plot_gh_results(weights, estimates, predictions, actual, time_step=0):
179
179
else :
180
180
rng = range (n , n + 1 )
181
181
xs = range (n + 1 )
182
- book_plots .plot_measurements (weights , color = 'k' , lines = False )
182
+ book_plots .plot_measurements (range ( 1 , len ( weights ) + 1 ), weights , color = 'k' , lines = False )
183
183
book_plots .plot_filter (xs , estimates , marker = 'o' , label = 'Estimates' )
184
184
book_plots .plot_track (xs [1 :], predictions , c = 'r' , marker = 'v' , label = 'Predictions' )
185
185
plt .plot ([xs [0 ], xs [- 1 ]], actual , c = 'k' , lw = 1 , label = 'Actual' )
0 commit comments