Skip to content Skip to sidebar Skip to footer

Aesthetics Of Barplot Bars And Error Bars In Seaborn

I'm using the seaborn library to visualize data and I want to change some things about the output graphs for publication. I want the error bars to be more narrow, with caps, and I

Solution 1:

barplot isn't using errorbar under the hood, it's just drawing lines in the interval of the CI, so there's no way to add caps. The errorbar width itself is just a scaled factor of the lines.linewidth rc parameter, so you can set that temporarily to control it:

with mpl.rc_context("lines.linewidth": 1}):
    colors = ["black", "grey", "white"]
    g = sns.barplot("TYPEMOD", "SCORE", ci=68, data=final_data,
                    palette=sns.xkcd_palette(colors))

Post a Comment for "Aesthetics Of Barplot Bars And Error Bars In Seaborn"