1from matplotlib import pyplot as plt
2
3fig = plt.figure()
4plt.plot(data)
5fig.suptitle('test title', fontsize=20)
6plt.xlabel('xlabel', fontsize=18)
7plt.ylabel('ylabel', fontsize=16)
8fig.savefig('test.jpg')
1import matplotlib.pyplot as plt
2
3SMALL_SIZE = 8
4MEDIUM_SIZE = 10
5BIGGER_SIZE = 12
6
7plt.rc('font', size=SMALL_SIZE) # controls default text sizes
8plt.rc('axes', titlesize=SMALL_SIZE) # fontsize of the axes title
9plt.rc('axes', labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
10plt.rc('xtick', labelsize=SMALL_SIZE) # fontsize of the tick labels
11plt.rc('ytick', labelsize=SMALL_SIZE) # fontsize of the tick labels
12plt.rc('legend', fontsize=SMALL_SIZE) # legend fontsize
13plt.rc('figure', titlesize=BIGGER_SIZE) # fontsize of the figure title
14