Skip to content
Merged
Show file tree
Hide file tree
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
BUG: now only set 'marker' and 'color' attribute of fliers in boxplots
  • Loading branch information
phobson committed Oct 1, 2014
commit 80085e3f617ea28b0e1c89ee3ce62ede46c5fcc1
12 changes: 4 additions & 8 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3062,8 +3062,7 @@ def boxplot(self, x, notch=False, sym=None, vert=True, whis=1.5,
if sym == '':
# blow away existing dict and make one for invisible markers
flierprops = dict(linestyle='none', marker='',
markeredgecolor='none',
markerfacecolor='none')
color='none')
# turn the fliers off just to be safe
showfliers = False
# now process the symbol string
Expand All @@ -3076,12 +3075,11 @@ def boxplot(self, x, notch=False, sym=None, vert=True, whis=1.5,
flierprops['marker'] = marker
# if we have a color, use it
if color is not None:
flierprops['color'] = color
# assume that if color is passed in the user want
# filled symbol, if the users want more control use
# flierprops
flierprops['markeredgecolor'] = color
flierprops['markerfacecolor'] = color
flierprops['color'] = color


# replace medians if necessary:
if usermedians is not None:
Expand Down Expand Up @@ -3320,9 +3318,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
final_whiskerprops.update(whiskerprops)

# set up the default flier properties
final_flierprops = dict(linestyle='none', marker='+',
markeredgecolor='b',
markerfacecolor='none')
final_flierprops = dict(linestyle='none', marker='+', color='blue')

# flier (outlier) properties
if flierprops is not None:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,6 +1629,18 @@ def test_boxplot_bad_ci_2():
conf_intervals=[[1, 2], [1]])


@image_comparison(baseline_images=['boxplot_mod_artists_after_plotting'],
remove_text=True, extensions=['png'],
savefig_kwarg={'dpi': 40})
def test_boxplot_mod_artist_after_plotting():
x = [0.15, 0.11, 0.06, 0.06, 0.12, 0.56, -0.56]
fig, ax = plt.subplots()
bp = ax.boxplot(x, sym="o")
for key in bp:
for obj in bp[key]:
obj.set_color('green')


@image_comparison(baseline_images=['violinplot_vert_baseline'],
extensions=['png'])
def test_vert_violinplot_baseline():
Expand Down