11import numpy as np
22
33
4-
54def _simpleaxis (ax ):
65 ax .spines ["top" ].set_visible (False )
76 ax .spines ["right" ].set_visible (False )
@@ -28,7 +27,6 @@ def plot_run_times(study, case_keys=None):
2827 run_times = study .get_run_times (case_keys = case_keys )
2928
3029 colors = study .get_colors ()
31-
3230
3331 fig , ax = plt .subplots ()
3432 labels = []
@@ -58,7 +56,6 @@ def plot_unit_counts(study, case_keys=None):
5856 if case_keys is None :
5957 case_keys = list (study .cases .keys ())
6058
61-
6259 count_units = study .get_count_units (case_keys = case_keys )
6360
6461 fig , ax = plt .subplots ()
@@ -95,6 +92,7 @@ def plot_unit_counts(study, case_keys=None):
9592
9693 return fig
9794
95+
9896def plot_performances (study , mode = "ordered" , performance_names = ("accuracy" , "precision" , "recall" ), case_keys = None ):
9997 """
10098 Plot performances over case for a study.
@@ -121,10 +119,9 @@ def plot_performances(study, mode="ordered", performance_names=("accuracy", "pre
121119 if case_keys is None :
122120 case_keys = list (study .cases .keys ())
123121
124- perfs = study .get_performance_by_unit (case_keys = case_keys )
122+ perfs = study .get_performance_by_unit (case_keys = case_keys )
125123 colors = study .get_colors ()
126124
127-
128125 if mode in ("ordered" , "snr" ):
129126 num_axes = len (performance_names )
130127 fig , axs = plt .subplots (ncols = num_axes )
@@ -195,7 +192,6 @@ def plot_agreement_matrix(study, ordered=True, case_keys=None):
195192 if case_keys is None :
196193 case_keys = list (study .cases .keys ())
197194
198-
199195 num_axes = len (case_keys )
200196 fig , axs = plt .subplots (ncols = num_axes )
201197
@@ -238,9 +234,9 @@ def plot_performances_vs_snr(study, case_keys=None, figsize=None, metrics=["accu
238234 y = study .get_result (key )["gt_comparison" ].get_performance ()[k ].values
239235 ax .scatter (x , y , marker = "." , label = label )
240236 ax .set_title (k )
241-
237+
242238 ax .set_ylim (0 , 1.05 )
243-
239+
244240 if count == 2 :
245241 ax .legend ()
246242
0 commit comments