Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d86ce6

Browse filesBrowse files
committed
Merge pull request matplotlib#3337 from tacaswell/bxp_flier_colors
BUG : don't assign color or marker to flier props if None
2 parents 9cb3350 + fa4b1ee commit 2d86ce6
Copy full SHA for 2d86ce6

File tree

Expand file treeCollapse file tree

3 files changed

+22
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+22
-6
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,12 +3298,14 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
32983298
# process the symbol string
32993299
# discarded linestyle
33003300
_, marker, color = _process_plot_format(sym)
3301-
flierprops['marker'] = marker
3302-
flierprops['color'] = color
3303-
# assume that if color is passed in the user want
3304-
# filled symbol
3305-
flierprops['markeredgecolor'] = color
3306-
flierprops['markerfacecolor'] = color
3301+
if marker is not None:
3302+
flierprops['marker'] = marker
3303+
if color is not None:
3304+
flierprops['color'] = color
3305+
# assume that if color is passed in the user want
3306+
# filled symbol
3307+
flierprops['markeredgecolor'] = color
3308+
flierprops['markerfacecolor'] = color
33073309
final_flierprops.update(flierprops)
33083310

33093311
# median line properties
Loading

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,20 @@ def test_boxplot():
15291529
ax.set_ylim((-30, 30))
15301530

15311531

1532+
@image_comparison(baseline_images=['boxplot_sym2'],
1533+
remove_text=True, extensions=['png'])
1534+
def test_boxplot_sym2():
1535+
x = np.linspace(-7, 7, 140)
1536+
x = np.hstack([-25, x, 25])
1537+
fig, [ax1, ax2] = plt.subplots(1, 2)
1538+
1539+
ax1.boxplot([x, x], bootstrap=10000, sym='^')
1540+
ax1.set_ylim((-30, 30))
1541+
1542+
ax2.boxplot([x, x], bootstrap=10000, sym='g')
1543+
ax2.set_ylim((-30, 30))
1544+
1545+
15321546
@image_comparison(baseline_images=['boxplot_sym'],
15331547
remove_text=True, extensions=['png'],
15341548
savefig_kwarg={'dpi': 40})

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.