import matplotlib.pyplot as plt
from cycler import cycler
import pandas as pd
import matplotlib.ticker as ticker
df = pd.read_csv("data.tsv", index_col=0 , sep = "\t").T
df = df.fillna(method = 'ffill')
fig, ax = plt.subplots(figsize=(12, 6))
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Noto Sans Display']
plt.subplots_adjust(left=0.07, bottom=0.16, right=0.96, top=0.93)
cc = cycler('ls', ['-', '--']) * cycler('lw', range(1, 3) )
ax.set_prop_cycle( plt.rcParams['axes.prop_cycle'] * cc)
ax.plot(df)
ax.legend(df.columns, fontsize=9, ncol=10, loc='center' ,bbox_to_anchor=(0., -0.19, 1, .102) ,facecolor="#eeeeee")
ax.set_axisbelow(True)
ax.axhspan(0,100, color="lightblue", alpha=0.5 , zorder=-10)
ax.xaxis.set_major_locator(ticker.MultipleLocator(2))
ax.yaxis.set_major_locator(ticker.MultipleLocator(10))
ax.margins(0.01)
plt.ylabel("percentage, USA=100", fontsize=12)
plt.ylim([40,150])
plt.title("Productivity, GDP per hour worked (OECD stats)", fontsize=16)
plt.tick_params(labelsize=9, pad=4)
plt.xticks(rotation=35, fontsize=7)
plt.yticks(fontsize=10)
plt.grid(which='major',color='#eeeeee',linestyle='--', axis="x")
plt.grid(which='major',color='#cccccc',linestyle='-', axis="y")
plt.savefig("image.svg")