for code in ["WORLD", "USA", "CHN", "EU28"]:
grouped = df.loc[code].reset_index().set_index("Year").groupby("Sector")["Emissions"]
fig, axes = plt.subplots(nrows=1, ncols=5, figsize=(12,4), sharey=True)
try:
name = to_name(code)
except KeyError:
name = code
fig.suptitle(name)
sectors = ['Power Industry', 'Transport', 'Buildings', 'Other industrial combustion', 'Non-combustion']
for (key, ax) in zip(sectors, axes):
ax.set_title(key, fontsize=10)
grouped.get_group(key).plot(ax=ax, legend=False)
ax.set_ylabel(unit)