@@ -367,23 +367,32 @@ def plot_data():
367
367
return data
368
368
369
369
370
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
370
+ @pytest .mark .mpl_image_compare (
371
+ baseline_dir = 'baseline_images/test_viz' ,
372
+ tolerance = 10
373
+ )
371
374
def test_probplot_prob (plot_data ):
372
375
fig , ax = plt .subplots ()
373
376
fig = viz .probplot (plot_data , ax = ax , xlabel = 'Test xlabel' , datascale = 'log' )
374
377
assert isinstance (fig , plt .Figure )
375
378
return fig
376
379
377
380
378
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
381
+ @pytest .mark .mpl_image_compare (
382
+ baseline_dir = 'baseline_images/test_viz' ,
383
+ tolerance = 10
384
+ )
379
385
def test_probplot_qq (plot_data ):
380
386
fig , ax = plt .subplots ()
381
387
fig = viz .probplot (plot_data , ax = ax , plottype = 'qq' , ylabel = 'Test label' ,
382
388
datascale = 'log' , scatter_kws = dict (color = 'r' ))
383
389
return fig
384
390
385
391
386
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
392
+ @pytest .mark .mpl_image_compare (
393
+ baseline_dir = 'baseline_images/test_viz' ,
394
+ tolerance = 10
395
+ )
387
396
def test_probplot_pp (plot_data ):
388
397
fig , ax = plt .subplots ()
389
398
scatter_kws = dict (color = 'b' , linestyle = '--' , markeredgecolor = 'g' , markerfacecolor = 'none' )
@@ -392,23 +401,32 @@ def test_probplot_pp(plot_data):
392
401
return fig
393
402
394
403
395
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
404
+ @pytest .mark .mpl_image_compare (
405
+ baseline_dir = 'baseline_images/test_viz' ,
406
+ tolerance = 10
407
+ )
396
408
def test_probplot_prob_bestfit (plot_data ):
397
409
fig , ax = plt .subplots ()
398
410
fig = viz .probplot (plot_data , ax = ax , xlabel = 'Test xlabel' , bestfit = True , datascale = 'log' )
399
411
assert isinstance (fig , plt .Figure )
400
412
return fig
401
413
402
414
403
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
415
+ @pytest .mark .mpl_image_compare (
416
+ baseline_dir = 'baseline_images/test_viz' ,
417
+ tolerance = 10
418
+ )
404
419
def test_probplot_qq_bestfit (plot_data ):
405
420
fig , ax = plt .subplots ()
406
421
fig = viz .probplot (plot_data , ax = ax , plottype = 'qq' , bestfit = True ,
407
422
ylabel = 'Test label' , datascale = 'log' )
408
423
return fig
409
424
410
425
411
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
426
+ @pytest .mark .mpl_image_compare (
427
+ baseline_dir = 'baseline_images/test_viz' ,
428
+ tolerance = 10
429
+ )
412
430
def test_probplot_pp_bestfit (plot_data ):
413
431
fig , ax = plt .subplots ()
414
432
scatter_kws = {'marker' : 's' , 'color' : 'red' }
@@ -419,23 +437,32 @@ def test_probplot_pp_bestfit(plot_data):
419
437
return fig
420
438
421
439
422
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
440
+ @pytest .mark .mpl_image_compare (
441
+ baseline_dir = 'baseline_images/test_viz' ,
442
+ tolerance = 10
443
+ )
423
444
def test_probplot_prob_probax_y (plot_data ):
424
445
fig , ax = plt .subplots ()
425
446
fig = viz .probplot (plot_data , ax = ax , xlabel = 'Test xlabel' , datascale = 'log' , probax = 'y' )
426
447
assert isinstance (fig , plt .Figure )
427
448
return fig
428
449
429
450
430
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
451
+ @pytest .mark .mpl_image_compare (
452
+ baseline_dir = 'baseline_images/test_viz' ,
453
+ tolerance = 10
454
+ )
431
455
def test_probplot_qq_probax_y (plot_data ):
432
456
fig , ax = plt .subplots ()
433
457
fig = viz .probplot (plot_data , ax = ax , plottype = 'qq' , ylabel = 'Test label' , probax = 'y' ,
434
458
datascale = 'log' , scatter_kws = dict (color = 'r' ))
435
459
return fig
436
460
437
461
438
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
462
+ @pytest .mark .mpl_image_compare (
463
+ baseline_dir = 'baseline_images/test_viz' ,
464
+ tolerance = 10
465
+ )
439
466
def test_probplot_pp_probax_y (plot_data ):
440
467
fig , ax = plt .subplots ()
441
468
scatter_kws = dict (color = 'b' , linestyle = '--' , markeredgecolor = 'g' , markerfacecolor = 'none' )
@@ -444,7 +471,10 @@ def test_probplot_pp_probax_y(plot_data):
444
471
return fig
445
472
446
473
447
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
474
+ @pytest .mark .mpl_image_compare (
475
+ baseline_dir = 'baseline_images/test_viz' ,
476
+ tolerance = 10
477
+ )
448
478
def test_probplot_prob_bestfit_probax_y (plot_data ):
449
479
fig , ax = plt .subplots ()
450
480
fig = viz .probplot (plot_data , ax = ax , xlabel = 'Test xlabel' , bestfit = True ,
@@ -453,15 +483,21 @@ def test_probplot_prob_bestfit_probax_y(plot_data):
453
483
return fig
454
484
455
485
456
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
486
+ @pytest .mark .mpl_image_compare (
487
+ baseline_dir = 'baseline_images/test_viz' ,
488
+ tolerance = 10
489
+ )
457
490
def test_probplot_qq_bestfit_probax_y (plot_data ):
458
491
fig , ax = plt .subplots ()
459
492
fig = viz .probplot (plot_data , ax = ax , plottype = 'qq' , bestfit = True , ylabel = 'Test label' ,
460
493
datascale = 'log' , probax = 'y' )
461
494
return fig
462
495
463
496
464
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
497
+ @pytest .mark .mpl_image_compare (
498
+ baseline_dir = 'baseline_images/test_viz' ,
499
+ tolerance = 10
500
+ )
465
501
def test_probplot_pp_bestfit_probax_y (plot_data ):
466
502
fig , ax = plt .subplots ()
467
503
scatter_kws = {'marker' : 's' , 'color' : 'red' }
@@ -472,7 +508,10 @@ def test_probplot_pp_bestfit_probax_y(plot_data):
472
508
return fig
473
509
474
510
475
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
511
+ @pytest .mark .mpl_image_compare (
512
+ baseline_dir = 'baseline_images/test_viz' ,
513
+ tolerance = 15
514
+ )
476
515
@pytest .mark .skipif (stats is None , reason = "no scipy" )
477
516
def test_probplot_beta_dist_best_fit_y (plot_data ):
478
517
fig , (ax1 , ax2 ) = plt .subplots (ncols = 2 )
@@ -489,7 +528,10 @@ def test_probplot_beta_dist_best_fit_y(plot_data):
489
528
return fig
490
529
491
530
492
- @pytest .mark .mpl_image_compare (baseline_dir = 'baseline_images/test_viz' )
531
+ @pytest .mark .mpl_image_compare (
532
+ baseline_dir = 'baseline_images/test_viz' ,
533
+ tolerance = 10
534
+ )
493
535
@pytest .mark .skipif (stats is None , reason = "no scipy" )
494
536
def test_probplot_beta_dist_best_fit_x (plot_data ):
495
537
fig , (ax1 , ax2 ) = plt .subplots (nrows = 2 )
0 commit comments