matplotlib图例、标签、坐标轴刻度的字体设置

plt.figure(figsize=[15,8]) 
plt.scatter(X, Y, label = 'RealValue')
plt.plot(X, func(X, a, b), 'red', label = 'CurveLine') 
plt.title(station, fontdict={'family' : 'Times New Roman', 'size' : 16})
plt.ylabel('Clocks($\mu S$)', fontdict={'family' : 'Times New Roman', 'size' : 16})
plt.xlabel('Time', fontdict={'family' : 'Times New Roman', 'size' : 16})
plt.yticks(fontproperties = 'Times New Roman', size = 14) 
plt.xticks(fontproperties = 'Times New Roman', size = 14) 
plt.legend(prop={'family' : 'Times New Roman', 'size' : 16})
plt.savefig('./stationClocks/' + station + '.ps', dpi = 200) 
plt.show()

 

你可能感兴趣的:(Python)