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=(10, 4))
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["Men"], color="#5E95CD")
ax.plot(df["Women"], color="#D676AB")
ax.legend(df.columns, fontsize=14, ncol=2, loc='upper left', frameon=True, facecolor="#dddddd")
ax.set_axisbelow(True)
plt.title("Life expectancy in Japan (IPSS)", fontsize=18)
plt.tick_params(labelsize=9, pad=4)
plt.ylabel("Age", fontsize=13)
plt.xticks(np.arange(1920, 2065, step=5), fontsize=8, rotation=70)
plt.yticks(fontsize=11)
plt.ylim([40,100])
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")