Skip to content

Commit

Permalink
Merge pull request #3337 from tacaswell/bxp_flier_colors
Browse files Browse the repository at this point in the history
BUG : don't assign color or marker to flier props if None
  • Loading branch information
tacaswell committed Aug 7, 2014
2 parents 9cb3350 + fa4b1ee commit 2d86ce6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/matplotlib/axes/_axes.py
Expand Up @@ -3298,12 +3298,14 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
# process the symbol string
# discarded linestyle
_, marker, color = _process_plot_format(sym)
flierprops['marker'] = marker
flierprops['color'] = color
# assume that if color is passed in the user want
# filled symbol
flierprops['markeredgecolor'] = color
flierprops['markerfacecolor'] = color
if marker is not None:
flierprops['marker'] = marker
if color is not None:
flierprops['color'] = color
# assume that if color is passed in the user want
# filled symbol
flierprops['markeredgecolor'] = color
flierprops['markerfacecolor'] = color
final_flierprops.update(flierprops)

# median line properties
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Expand Up @@ -1529,6 +1529,20 @@ def test_boxplot():
ax.set_ylim((-30, 30))


@image_comparison(baseline_images=['boxplot_sym2'],
remove_text=True, extensions=['png'])
def test_boxplot_sym2():
x = np.linspace(-7, 7, 140)
x = np.hstack([-25, x, 25])
fig, [ax1, ax2] = plt.subplots(1, 2)

ax1.boxplot([x, x], bootstrap=10000, sym='^')
ax1.set_ylim((-30, 30))

ax2.boxplot([x, x], bootstrap=10000, sym='g')
ax2.set_ylim((-30, 30))


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

0 comments on commit 2d86ce6

Please sign in to comment.