1010
1111from fooof .core .modutils import safe_import , check_dependency
1212from fooof .plts .utils import check_ax , set_alpha
13+ from fooof .plts .settings import TITLE_FONTSIZE , LABEL_SIZE , TICK_LABELSIZE
1314
1415plt = safe_import ('.pyplot' , 'matplotlib' )
1516
@@ -46,14 +47,14 @@ def plot_scatter_1(data, label=None, title=None, x_val=0, ax=None):
4647 ax .scatter (x_data , data , s = 36 , alpha = set_alpha (len (data )))
4748
4849 if label :
49- ax .set_ylabel (label , fontsize = 16 )
50+ ax .set_ylabel (label , fontsize = LABEL_SIZE )
5051 ax .set (xticks = [x_val ], xticklabels = [label ])
5152
5253 if title :
53- ax .set_title (title , fontsize = 20 )
54+ ax .set_title (title , fontsize = TITLE_FONTSIZE )
5455
55- ax .tick_params (axis = 'x' , labelsize = 16 )
56- ax .tick_params (axis = 'y' , labelsize = 12 )
56+ ax .tick_params (axis = 'x' , labelsize = TICK_LABELSIZE )
57+ ax .tick_params (axis = 'y' , labelsize = TICK_LABELSIZE )
5758
5859 ax .set_xlim ([- 0.5 , 0.5 ])
5960
@@ -89,12 +90,12 @@ def plot_scatter_2(data_0, label_0, data_1, label_1, title=None, ax=None):
8990 plot_scatter_1 (data_1 , label_1 , x_val = 1 , ax = ax1 )
9091
9192 if title :
92- ax .set_title (title , fontsize = 20 )
93+ ax .set_title (title , fontsize = TITLE_FONTSIZE )
9394
9495 ax .set (xlim = [- 0.5 , 1.5 ],
9596 xticks = [0 , 1 ],
9697 xticklabels = [label_0 , label_1 ])
97- ax .tick_params (axis = 'x' , labelsize = 16 )
98+ ax .tick_params (axis = 'x' , labelsize = TICK_LABELSIZE )
9899
99100
100101@check_dependency (plt , 'matplotlib' )
@@ -121,13 +122,13 @@ def plot_hist(data, label, title=None, n_bins=25, x_lims=None, ax=None):
121122
122123 ax .hist (data [~ np .isnan (data )], n_bins , range = x_lims , alpha = 0.8 )
123124
124- ax .set_xlabel (label , fontsize = 16 )
125- ax .set_ylabel ('Count' , fontsize = 16 )
125+ ax .set_xlabel (label , fontsize = LABEL_SIZE )
126+ ax .set_ylabel ('Count' , fontsize = LABEL_SIZE )
126127
127128 if x_lims :
128129 ax .set_xlim (x_lims )
129130
130131 if title :
131- ax .set_title (title , fontsize = 20 )
132+ ax .set_title (title , fontsize = TITLE_FONTSIZE )
132133
133- ax .tick_params (axis = 'both' , labelsize = 12 )
134+ ax .tick_params (axis = 'both' , labelsize = TICK_LABELSIZE )
0 commit comments