import matplotlib.pyplot as plt
from cycler import cycler
import pandas as pd
df = pd.read_csv("data.tsv", index_col=0 , sep = "\t")
df = df.fillna(method = 'ffill')
df1 = df.reindex(columns=['Total'])
fig, ax = plt.subplots(figsize=(12, 8))
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans Display']
plt.rcParams['axes.xmargin'] = 0
plt.rcParams['axes.ymargin'] = 0
plt.subplots_adjust(left=0.07, bottom=0.15, right=0.96, top=0.93)
cc = cycler('ls', ['-', '--'])
ax.set_prop_cycle( plt.rcParams['axes.prop_cycle'] * cc)
ax.plot(df)
ax.fill_between( df1.index ,0, df1["Total"].values, color="lightblue", alpha=0.5)
ax.set_axisbelow(True)
ax.legend(df.columns, fontsize=12, ncol=8, loc='center' ,bbox_to_anchor=(0, -0.23, 1, 0.24) )
plt.title("Public Assitance Population in Japan, by Age (MHLW)", fontsize=18)
plt.tick_params(labelsize=9, pad=4)
plt.ylabel("Per 1000 Persons", fontsize=13)
plt.xticks(df.index, rotation=75, fontsize=8)
plt.yticks(fontsize=11)
plt.minorticks_on()
plt.grid(which='major',color='#999999',linestyle='-', axis="y")
plt.grid(which='minor',color='#eeeeee',linestyle='-', axis="y")
plt.savefig("image.svg")