ax.axis[direction].set_visible(False)

# fig, ax = plt.subplots(figsize=(1.5,4))
# for edge in ['bottom', 'right', 'top']:
#     ax.spines[edge].set_visible(False)

lmp.plot.bar(stacked=True, ax=ax, legend=False, color=c, position=-0.3)
ax.set_xlim(left=0)

bottom = 0
for i, c in enumerate(lmp):
    y = bottom + .5 * lmp.at['lmp', c]
    # ax.bar(1, lmp.at['lmp', c], 0.2, bottom)
    bottom += lmp.at['lmp', c]
    ax.annotate(c,
                xy=(.67, y),
                xytext=(.9, y),
                zorder=8,
                arrowprops=dict(arrowstyle='-'),
                verticalalignment='center')

ax.set_ylabel('$\lambda_{n,t}$  [€/MWh]')
ax.set_xticks([])
ax.set_yticklabels([])

fig.tight_layout()
fig.savefig(snakemake.output.price_decomposition, bbox_inches='tight')

ax.set_ylabel('Total System Cost')
fig.savefig(snakemake.output.cost_decomposition, bbox_inches='tight')