Skip to content

Commit

Permalink
Update categorical.py
Browse files Browse the repository at this point in the history
Fixing bootstrap issue in boxplot
  • Loading branch information
utkarshp authored Nov 16, 2023
1 parent 63d91bf commit 0ac69be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seaborn/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def get_props(element, artist=mpl.lines.Line2D):

if not fill and linewidth is None:
linewidth = mpl.rcParams["lines.linewidth"]

bootstrap = plot_kws.pop("bootstrap", mpl.rcParams["boxplot.bootstrap"])
plot_kws.setdefault("shownotches", plot_kws.pop("notch", False))

box_artist = mpl.patches.Rectangle if fill else mpl.lines.Line2D
Expand All @@ -626,7 +626,7 @@ def get_props(element, artist=mpl.lines.Line2D):

grouped = sub_data.groupby(self.orient)[value_var]
value_data = [x.to_numpy() for _, x in grouped]
stats = pd.DataFrame(mpl.cbook.boxplot_stats(value_data, whis=whis))
stats = pd.DataFrame(mpl.cbook.boxplot_stats(value_data, whis=whis, bootstrap=bootstrap))
positions = grouped.grouper.result_index.to_numpy(dtype=float)

orig_width = width * self._native_width
Expand Down

0 comments on commit 0ac69be

Please sign in to comment.