Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update categorical.py
Fixing bootstrap issue in boxplot
  • Loading branch information
utkarshp authored Nov 16, 2023
commit 0ac69be414b89a4ee85315f8427e7eac4b4511d4
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