(
stats_kwargs={}, transform_stats=lambda s: s, bxp_kwargs={})
| 3546 | |
| 3547 | |
| 3548 | def _bxp_test_helper( |
| 3549 | stats_kwargs={}, transform_stats=lambda s: s, bxp_kwargs={}): |
| 3550 | np.random.seed(937) |
| 3551 | logstats = mpl.cbook.boxplot_stats( |
| 3552 | np.random.lognormal(mean=1.25, sigma=1., size=(37, 4)), **stats_kwargs) |
| 3553 | fig, ax = plt.subplots() |
| 3554 | if bxp_kwargs.get('orientation', 'vertical') == 'vertical': |
| 3555 | ax.set_yscale('log') |
| 3556 | else: |
| 3557 | ax.set_xscale('log') |
| 3558 | # Work around baseline images generate back when bxp did not respect the |
| 3559 | # boxplot.boxprops.linewidth rcParam when patch_artist is False. |
| 3560 | if not bxp_kwargs.get('patch_artist', False): |
| 3561 | mpl.rcParams['boxplot.boxprops.linewidth'] = \ |
| 3562 | mpl.rcParams['lines.linewidth'] |
| 3563 | ax.bxp(transform_stats(logstats), **bxp_kwargs) |
| 3564 | |
| 3565 | |
| 3566 | @image_comparison(['bxp_baseline.png'], |
no test coverage detected
searching dependent graphs…