0

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)

that return this chartenter image description here How can i remove these lines?

  • 1
    If only your code will be reproducible so we could copy paste and run it... Why didn't you create a code with fake hardcoded data, so it could be run? – Sembei Norimaki Nov 14 '22 at 16:53
  • 1
    Have a look at [`ax.tick_params`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.tick_params.html) – Alex P Nov 14 '22 at 16:54

0 Answers0