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

Skip to content

Commit ee74cb8

Browse files
committed
TST: tests and images autorange boxplots
1 parent 39a4784 commit ee74cb8

4 files changed

Lines changed: 384 additions & 5 deletions

File tree

Binary file not shown.
6.73 KB
Loading
Lines changed: 374 additions & 0 deletions
Loading

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,14 +1785,19 @@ def test_boxplot_sym():
17851785
ax.set_ylim((-30, 30))
17861786

17871787

1788-
@image_comparison(baseline_images=['boxplot_autorange_false_whiskers'])
1788+
@image_comparison(baseline_images=['boxplot_autorange_false_whiskers',
1789+
'boxplot_autorange_true_whiskers'])
17891790
def test_boxplot_autorange_whiskers():
17901791
x = np.ones(140)
17911792
x = np.hstack([0, x, 2])
1792-
fig, ax = plt.subplots()
1793-
1794-
ax.boxplot([x, x], bootstrap=10000, notch=1)
1795-
ax.set_ylim((-5, 5))
1793+
1794+
fig1, ax1 = plt.subplots()
1795+
ax1.boxplot([x, x], bootstrap=10000, notch=1)
1796+
ax1.set_ylim((-5, 5))
1797+
1798+
fig2, ax2 = plt.subplots()
1799+
ax2.boxplot([x, x], bootstrap=10000, notch=1, autorange=True)
1800+
ax2.set_ylim((-5, 5))
17961801

17971802
def _rc_test_bxp_helper(ax, rc_dict):
17981803
x = np.linspace(-7, 7, 140)

0 commit comments

Comments
 (0)