Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b8aee2

Browse files
committed
Check that bxp() applies the boxplot.boxprops.linewidth rc.
1 parent e1cb5d2 commit 2b8aee2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ def layers(n, m):
21112111
def _bxp_test_helper(
21122112
stats_kwargs={}, transform_stats=lambda s: s, bxp_kwargs={}):
21132113
np.random.seed(937)
2114-
logstats = matplotlib.cbook.boxplot_stats(
2114+
logstats = mpl.cbook.boxplot_stats(
21152115
np.random.lognormal(mean=1.25, sigma=1., size=(37, 4)), **stats_kwargs)
21162116
fig, ax = plt.subplots()
21172117
if bxp_kwargs.get('vert', True):
@@ -2121,8 +2121,8 @@ def _bxp_test_helper(
21212121
# Work around baseline images generate back when bxp did not respect the
21222122
# boxplot.boxprops.linewidth rcParam when patch_artist is False.
21232123
if not bxp_kwargs.get('patch_artist', False):
2124-
(bxp_kwargs.setdefault('boxprops', {})
2125-
.setdefault('linewidth', matplotlib.rcParams["lines.linewidth"]))
2124+
mpl.rcParams['boxplot.boxprops.linewidth'] = \
2125+
mpl.rcParams['lines.linewidth']
21262126
ax.bxp(transform_stats(logstats), **bxp_kwargs)
21272127

21282128

0 commit comments

Comments
 (0)