Im have this code that gen a bar chart using seaborn and matplotlib.
fig = figure.Figure(figsize=figsize)
ax = fig.add_subplot()
g = sns.barplot(y=y, x=x, data=data, ax=ax, ci=False, orient='h', order=orderlist)
g.set(xlabel=None, ylabel=None, xticks=[])
ax.set_yticklabels([], fontsize=9)
for x in g.containers:
currency_labels = []
for value in x.datavalues:
currency_labels.append(
format_decimal(value)
)
ax.bar_label(x, rotation=0, padding=5, fmt='%.0f', fontsize=9, labels=currency_labels)
sns.despine(ax=ax, left=True, bottom=True)
fig.tight_layout()
fig.savefig(saveloc, dpi=2000)