| 3808 | |
| 3809 | @image_comparison(['boxplot.png', 'boxplot.png'], tol=0.43, style='default') |
| 3810 | def test_boxplot(): |
| 3811 | # Randomness used for bootstrapping. |
| 3812 | np.random.seed(937) |
| 3813 | |
| 3814 | x = np.linspace(-7, 7, 140) |
| 3815 | x = np.hstack([-25, x, 25]) |
| 3816 | fig, ax = plt.subplots() |
| 3817 | |
| 3818 | ax.boxplot([x, x], bootstrap=10000, notch=1) |
| 3819 | ax.set_ylim(-30, 30) |
| 3820 | |
| 3821 | # Reuse testcase from above for a labeled data test |
| 3822 | data = {"x": [x, x]} |
| 3823 | fig, ax = plt.subplots() |
| 3824 | ax.boxplot("x", bootstrap=10000, notch=1, data=data) |
| 3825 | ax.set_ylim(-30, 30) |
| 3826 | |
| 3827 | |
| 3828 | @check_figures_equal() |