Skip to content

Commit 58d65ee

Browse files
committed
remove dots and show only moving average line
1 parent 069a30b commit 58d65ee

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lectures/inflation_history.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,6 @@ def pr_plot(p_seq, index, ax):
329329
# Calculate the difference of log p_seq
330330
log_diff_p = np.diff(np.log(p_seq))
331331
332-
# Graph for the difference of log p_seq
333-
ax.scatter(index[1:], log_diff_p,
334-
label='Monthly inflation rate',
335-
color='tab:grey')
336-
337332
# Calculate and plot moving average
338333
diff_smooth = pd.DataFrame(log_diff_p).rolling(3, center=True).mean()
339334
ax.plot(index[1:], diff_smooth, label='Moving average (3 period)', alpha=0.5, lw=2)
@@ -347,7 +342,7 @@ def pr_plot(p_seq, index, ax):
347342
for label in ax.get_xticklabels():
348343
label.set_rotation(45)
349344
350-
ax.legend(loc='upper left')
345+
ax.legend()
351346
352347
return ax
353348
```

0 commit comments

Comments
 (0)