X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 4 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3733,9 +3733,6 @@ def dopatch(xs, ys, **kwargs):
for pos, width, stats in zip(positions, widths, bxpstats):
# try to find a new label
datalabels.append(stats.get('label', pos))
# fliers coords
flier_x = np.ones(len(stats['fliers'])) * pos
flier_y = stats['fliers']

# whisker coords
whisker_x = np.ones(2) * pos
Expand Down Expand Up @@ -3809,6 +3806,10 @@ def dopatch(xs, ys, **kwargs):

# maybe draw the fliers
if showfliers:
# fliers coords
flier_x = np.ones(len(stats['fliers'])) * pos
flier_y = stats['fliers']

fliers.extend(doplot(
flier_x, flier_y, **final_flierprops
))
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1712,6 +1712,23 @@ def test_bxp_nobox():
ax.bxp(logstats, showbox=False)


@image_comparison(baseline_images=['bxp_no_flier_stats'],
remove_text=True, extensions=['png'],
savefig_kwarg={'dpi': 40},
style='default')
def test_bxp_no_flier_stats():
np.random.seed(937)
logstats = matplotlib.cbook.boxplot_stats(
np.random.lognormal(mean=1.25, sigma=1., size=(37, 4))
)
for ls in logstats:
ls.pop('fliers', None)

fig, ax = plt.subplots()
ax.set_yscale('log')
ax.bxp(logstats, showfliers=False)


@image_comparison(baseline_images=['bxp_withmean_point'],
remove_text=True, extensions=['png'],
savefig_kwarg={'dpi': 40},
Expand Down
X Tutup