Skip to content

Commit

Permalink
Allow align= to sneak through in barplot (but ignore CIs for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Jun 15, 2022
1 parent 90473b7 commit 63b46f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions seaborn/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,11 +1597,14 @@ def draw_bars(self, ax, kws):
barfunc = ax.bar if self.orient == "v" else ax.barh
barpos = np.arange(len(self.statistic))

kws = kws.copy()
kws.setdefault("align", "center")

if self.plot_hues is None:

# Draw the bars
barfunc(barpos, self.statistic, self.width,
color=self.colors, align="center", **kws)
color=self.colors, **kws)

# Draw the confidence intervals
errcolors = [self.errcolor] * len(barpos)
Expand All @@ -1619,7 +1622,7 @@ def draw_bars(self, ax, kws):
# Draw the bars
offpos = barpos + self.hue_offsets[j]
barfunc(offpos, self.statistic[:, j], self.nested_width,
color=self.colors[j], align="center",
color=self.colors[j],
label=hue_level, **kws)

# Draw the confidence intervals
Expand Down

0 comments on commit 63b46f8

Please sign in to comment.