要增加字体的大小,请将所需值设置为fontsize。缓解“正常”字体和“latex”字体之间差异的一种方法是使用\mathrm。下面的示例显示了这样做的行为:
import matplotlib.pyplot as plt
import seaborn as sns
x = np.arange(10)
y = np.random.rand(10)
fig = plt.figure(1, figsize=(10,10))
for i, j in zip(np.arange(4), [10,15,20,30]):
ax = fig.add_subplot(2,2,i+1)
ax.plot(x, y, linestyle='--', marker='o', color='b')
ax.set_xlabel(r'$\mathrm{\alpha \ (distance \ weighted)}$', fontsize=j)
ax.set_ylabel('AUC')
plt.show()
r'$\alpha\/\mathsf{(distance\/weighted)}$'
。 - mwaskom