Skip to content

Commit

Permalink
control font size
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Oct 28, 2016
1 parent cdcc4ba commit 27fa810
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,17 @@ def test(s, model, name, params, train_data, train_labels, val_data, val_labels,
print('test {}'.format(string))
s.names.add(name)

def show(s):
def show(s, fontsize=None):
if fontsize:
plt.rc('pdf', fonttype=42)
plt.rc('ps', fonttype=42)
plt.rc('font', size=fontsize) # controls default text sizes
plt.rc('axes', titlesize=fontsize) # fontsize of the axes title
plt.rc('axes', labelsize=fontsize) # fontsize of the x any y labels
plt.rc('xtick', labelsize=fontsize) # fontsize of the tick labels
plt.rc('ytick', labelsize=fontsize) # fontsize of the tick labels
plt.rc('legend', fontsize=fontsize) # legend fontsize
plt.rc('figure', titlesize=fontsize) # size of the figure title
print(' accuracy F1 loss time [ms] name')
print('test train test train test train')
for name in sorted(s.names):
Expand Down

0 comments on commit 27fa810

Please sign in to comment.