import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.read_csv("data.tsv", index_col=0 , sep = "\t")
df = df.fillna(method="ffill")
fig, ax = plt.subplots(figsize=(12, 5))
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans Display']
plt.subplots_adjust(left=0.07, bottom=0.10, right=0.96, top=0.91)
ax.plot(df["Birth"].div(1000) , color="#D676AB")
ax.plot(df["Death"].div(1000) , color="#5E95CD")
ax.legend(df.columns, fontsize=14, ncol=2, loc='upper right', frameon=True, facecolor="#dddddd")
ax.set_axisbelow(True)
plt.title("Live births and deaths of Japan (MHLW Vital statistics)", fontsize=18)
plt.tick_params(labelsize=9, pad=4)
plt.ylabel("1000 person", fontsize=13)
plt.xticks(np.arange(1900, 2021, step=2), fontsize=8, rotation=70)
plt.yticks(fontsize=11)
plt.ylim([0,3000])
plt.minorticks_on()
plt.grid(which='major',color='#cccccc',linestyle='-', axis="x")
plt.grid(which='minor', linestyle='None', axis="x")
plt.grid(which='major',color='#cccccc',linestyle='-', axis="y")
plt.grid(which='minor',color='#eeeeee',linestyle='-', axis="y")
plt.savefig("image.svg")