@@ -744,6 +744,7 @@ def test_probplot_prob(plot_data):
744744
745745@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
746746def test_probplot_qq (plot_data ):
747+ plt .close ("all" )
747748 fig , ax = plt .subplots ()
748749 fig = viz .probplot (
749750 plot_data ,
@@ -759,6 +760,7 @@ def test_probplot_qq(plot_data):
759760@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
760761@pytest .mark .skipif (stats is None , reason = "no scipy" )
761762def test_probplot_qq_dist (plot_data ):
763+ plt .close ("all" )
762764 fig , ax = plt .subplots ()
763765 norm = stats .norm (* stats .norm .fit (plot_data ))
764766 fig = viz .probplot (
@@ -769,6 +771,7 @@ def test_probplot_qq_dist(plot_data):
769771
770772@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
771773def test_probplot_pp (plot_data ):
774+ plt .close ("all" )
772775 fig , ax = plt .subplots ()
773776 scatter_kws = dict (
774777 color = "b" , linestyle = "--" , markeredgecolor = "g" , markerfacecolor = "none"
@@ -791,6 +794,7 @@ def test_probplot_pp(plot_data):
791794 remove_text = True ,
792795)
793796def test_probplot_prob_bestfit (plot_data ):
797+ plt .close ("all" )
794798 fig , ax = plt .subplots ()
795799 fig = viz .probplot (
796800 plot_data ,
@@ -806,6 +810,7 @@ def test_probplot_prob_bestfit(plot_data):
806810
807811@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
808812def test_probplot_prob_bestfit_exceedance (plot_data ):
813+ plt .close ("all" )
809814 fig , ax = plt .subplots ()
810815 fig = viz .probplot (
811816 plot_data ,
@@ -822,6 +827,7 @@ def test_probplot_prob_bestfit_exceedance(plot_data):
822827
823828@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
824829def test_probplot_qq_bestfit (plot_data ):
830+ plt .close ("all" )
825831 fig , ax = plt .subplots ()
826832 fig = viz .probplot (
827833 plot_data ,
@@ -837,6 +843,7 @@ def test_probplot_qq_bestfit(plot_data):
837843
838844@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
839845def test_probplot_pp_bestfit (plot_data ):
846+ plt .close ("all" )
840847 fig , ax = plt .subplots ()
841848 scatter_kws = {"marker" : "s" , "color" : "red" }
842849 line_kws = {"linestyle" : "--" , "linewidth" : 3 }
@@ -857,6 +864,7 @@ def test_probplot_pp_bestfit(plot_data):
857864
858865@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
859866def test_probplot_prob_probax_y (plot_data ):
867+ plt .close ("all" )
860868 fig , ax = plt .subplots ()
861869 fig = viz .probplot (
862870 plot_data , ax = ax , datalabel = "Test xlabel" , datascale = "log" , probax = "y"
@@ -867,6 +875,7 @@ def test_probplot_prob_probax_y(plot_data):
867875
868876@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
869877def test_probplot_qq_probax_y (plot_data ):
878+ plt .close ("all" )
870879 fig , ax = plt .subplots ()
871880 fig = viz .probplot (
872881 plot_data ,
@@ -882,6 +891,7 @@ def test_probplot_qq_probax_y(plot_data):
882891
883892@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
884893def test_probplot_pp_probax_y (plot_data ):
894+ plt .close ("all" )
885895 fig , ax = plt .subplots ()
886896 scatter_kws = dict (
887897 color = "b" , linestyle = "--" , markeredgecolor = "g" , markerfacecolor = "none"
@@ -901,6 +911,7 @@ def test_probplot_pp_probax_y(plot_data):
901911
902912@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
903913def test_probplot_prob_bestfit_probax_y (plot_data ):
914+ plt .close ("all" )
904915 fig , ax = plt .subplots ()
905916 fig = viz .probplot (
906917 plot_data ,
@@ -917,6 +928,7 @@ def test_probplot_prob_bestfit_probax_y(plot_data):
917928
918929@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
919930def test_probplot_qq_bestfit_probax_y (plot_data ):
931+ plt .close ("all" )
920932 fig , ax = plt .subplots ()
921933 fig = viz .probplot (
922934 plot_data ,
@@ -933,6 +945,7 @@ def test_probplot_qq_bestfit_probax_y(plot_data):
933945
934946@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
935947def test_probplot_pp_bestfit_probax_y (plot_data ):
948+ plt .close ("all" )
936949 fig , ax = plt .subplots ()
937950 scatter_kws = {"marker" : "s" , "color" : "red" }
938951 line_kws = {"linestyle" : "--" , "linewidth" : 3 }
@@ -955,6 +968,7 @@ def test_probplot_pp_bestfit_probax_y(plot_data):
955968@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = LOOSE_TOLERANCE )
956969@pytest .mark .skipif (stats is None , reason = "no scipy" )
957970def test_probplot_beta_dist_best_fit_y (plot_data ):
971+ plt .close ("all" )
958972 fig , (ax1 , ax2 ) = plt .subplots (ncols = 2 )
959973 dist = stats .beta (3 , 3 )
960974 fig = viz .probplot (
@@ -990,6 +1004,7 @@ def test_probplot_beta_dist_best_fit_y(plot_data):
9901004)
9911005@pytest .mark .skipif (stats is None , reason = "no scipy" )
9921006def test_probplot_beta_dist_best_fit_x (plot_data ):
1007+ plt .close ("all" )
9931008 fig , (ax1 , ax2 ) = plt .subplots (nrows = 2 )
9941009 dist = stats .beta (3 , 3 )
9951010 fig = viz .probplot (
@@ -1019,6 +1034,7 @@ def test_probplot_beta_dist_best_fit_x(plot_data):
10191034
10201035
10211036def test_probplot_test_results (plot_data ):
1037+ plt .close ("all" )
10221038 fig , ax = plt .subplots ()
10231039 fig , results = viz .probplot (plot_data , return_best_fit_results = True )
10241040
@@ -1046,6 +1062,7 @@ def test__set_prob_limits_x(probax, N, minval, maxval):
10461062
10471063@pytest .mark .mpl_image_compare (baseline_dir = BASELINE_DIR , tolerance = TIGHT_TOLERANCE )
10481064def test_probplot_color_and_label (plot_data ):
1065+ plt .close ("all" )
10491066 fig , ax = plt .subplots ()
10501067 fig = viz .probplot (plot_data , ax = ax , color = "pink" , label = "A Top-Level Label" )
10511068 ax .legend (loc = "lower right" )
0 commit comments