如何为matplotlib轴标签设置自定义字体?
这会将轴标签更改为我想要的字体,但如何更改每个轴上的数字如何为matplotlib轴标签设置自定义字体?,matplotlib,Matplotlib,这会将轴标签更改为我想要的字体,但如何更改每个轴上的数字 import matplotlib.pyplot as plt prop = fm.FontProperties(fname='/Users/NAME/Downloads/GARA.ttf') sns.lineplot(x=stlr_df['Number of Steps'], y= stlr_df['Learning Rate'], color='purple') plt.xlabel('Number of Steps',fo
import matplotlib.pyplot as plt
prop = fm.FontProperties(fname='/Users/NAME/Downloads/GARA.ttf')
sns.lineplot(x=stlr_df['Number of Steps'], y= stlr_df['Learning Rate'], color='purple')
plt.xlabel('Number of Steps',fontproperties=prop, size=14)
plt.ylabel('Learning Rate',fontproperties=prop, size=14)```
指定的
fontproperties
参数
plt.xticks(fontproperties=prop,size=14)
plt.yticks(fontproperties=prop,size=14)