Skip to content

Commit bde157f

Browse files
committed
adjust figsize,font globally and remove embedded figure text
1 parent 4e7a5cc commit bde157f

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

lectures/inflation_history.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ We start by installing a library we will use followed by importing some Python m
5757
```{code-cell} ipython3
5858
import numpy as np
5959
import pandas as pd
60-
import matplotlib
61-
matplotlib.rcParams['figure.figsize'] = (13, 7)
6260
import matplotlib.pyplot as plt
61+
plt.matplotlib.rcParams['figure.figsize'] = (12,8)
62+
plt.rcParams.update({'font.size': 19})
6363
import matplotlib.dates as mdates
6464
```
6565

@@ -417,10 +417,6 @@ lab = ['Retail Price Index', 'Exchange Rate']
417417
fig, ax = plt.subplots(dpi=200)
418418
_ = pe_plot(p_seq, e_seq, df_Aus.index, lab, ax)
419419
420-
# connect disjunct parts
421-
plt.figtext(0.5, -0.02, 'Austria',
422-
horizontalalignment='center',
423-
fontsize=12)
424420
plt.show()
425421
```
426422

@@ -435,9 +431,6 @@ mystnb:
435431
fig, ax = plt.subplots(dpi=200)
436432
_ = pr_plot(p_seq, df_Aus.index, ax)
437433
438-
plt.figtext(0.5, -0.02, 'Austria',
439-
horizontalalignment='center',
440-
fontsize=12)
441434
plt.show()
442435
```
443436

@@ -473,9 +466,6 @@ lab = ['Hungarian Index of Prices',
473466
fig, ax = plt.subplots(dpi=200)
474467
_ = pe_plot(p_seq, e_seq, df_Hung.index, lab, ax)
475468
476-
plt.figtext(0.5, -0.02, 'Hungary',
477-
horizontalalignment='center',
478-
fontsize=12)
479469
plt.show()
480470
```
481471

@@ -490,9 +480,6 @@ mystnb:
490480
fig, ax = plt.subplots(dpi=200)
491481
_ = pr_plot(p_seq, df_Hung.index, ax)
492482
493-
plt.figtext(0.5, -0.02, 'Hungary',
494-
horizontalalignment='center',
495-
fontsize=12)
496483
plt.show()
497484
```
498485

@@ -514,6 +501,7 @@ mystnb:
514501
figure:
515502
caption: "Price index and exchange rate (Poland)"
516503
name: pi_xrate_poland
504+
scale: 95%
517505
---
518506
# splice three price series in different units
519507
p_seq1 = df_Pol['Wholesale price index'].copy()
@@ -548,9 +536,6 @@ lab = ['Wholesale Price Index',
548536
fig, ax = plt.subplots(dpi=200)
549537
ax1 = pe_plot(p_seq, e_seq, df_Pol.index, lab, ax)
550538
551-
plt.figtext(0.5, -0.02, 'Poland',
552-
horizontalalignment='center',
553-
fontsize=12)
554539
plt.show()
555540
```
556541

@@ -560,14 +545,12 @@ mystnb:
560545
figure:
561546
caption: "Monthly inflation rate (Poland)"
562547
name: inflationrate_poland
548+
scale: 95%
563549
---
564550
# plot moving average
565551
fig, ax = plt.subplots(dpi=200)
566552
_ = pr_plot(p_seq, df_Pol.index, ax)
567553
568-
plt.figtext(0.5, -0.02, 'Poland',
569-
horizontalalignment='center',
570-
fontsize=12)
571554
plt.show()
572555
```
573556

@@ -596,9 +579,6 @@ lab = ['Price Index',
596579
fig, ax = plt.subplots(dpi=200)
597580
ax1 = pe_plot(p_seq, e_seq, df_Germ.index, lab, ax)
598581
599-
plt.figtext(0.5, -0.06, 'Germany',
600-
horizontalalignment='center',
601-
fontsize=12)
602582
plt.show()
603583
```
604584

@@ -626,9 +606,6 @@ lab = ['Price Index (Marks or converted to Marks)',
626606
fig, ax = plt.subplots(dpi=200)
627607
ax1 = pe_plot(p_seq, e_seq, df_Germ.index, lab, ax)
628608
629-
plt.figtext(0.5, -0.02, 'Germany',
630-
horizontalalignment='center',
631-
fontsize=12)
632609
plt.show()
633610
```
634611

@@ -643,9 +620,6 @@ mystnb:
643620
fig, ax = plt.subplots(dpi=200)
644621
_ = pr_plot(p_seq, df_Germ.index, ax)
645622
646-
plt.figtext(0.5, -0.02, 'Germany',
647-
horizontalalignment='center',
648-
fontsize=12)
649623
plt.show()
650624
```
651625

0 commit comments

Comments
 (0)