import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
df = pd.read_csv("data.tsv", index_col=0 , sep = "\t")
fig, ax = plt.subplots(figsize=(12, 5))
x = np.arange(df.index.size)
ax.bar(x-0.1, df["2012"] , color="#F79646", width=0.5, bottom=0)
ax.bar(x+0.3, df["2050"] , color="#C6A389", width=0.3, bottom=0)
ax.legend(df.columns, fontsize=14, ncol=2, loc='upper right', frameon=True, facecolor="#dddddd")
ax.set_axisbelow(True)
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans Display']
plt.subplots_adjust(left=0.07, bottom=0.17, right=0.99, top=0.9)
plt.title("Old-age support ratio (OECD Society at Glance 2014)", fontsize=20)
plt.tick_params(labelsize=10, pad=4)
plt.xticks(x, df.index, rotation=55, size=9)
plt.ylabel("Number of working-age (20-64)\n per old-age (65+)", size=11)
plt.yticks(fontsize=11)
plt.ylim([0,9])
ax.minorticks_on()
plt.grid(which='major',color='#999999',linestyle='-', axis="y")
plt.grid(which='minor',color='#eeeeee',linestyle='--', axis="y")
plt.savefig("image.svg")