问题描述
真的很抱歉,从昨天开始一直在搜索这个,我还没有看到类似的问题。
图有点大,只贴一些相关部分:
plt.rcParams.update({
"text.usetex": True})
font = {'family': 'serif','serif': ['Computer Modern'],'weight' : 'bold','size' : 22}
matplotlib.rc('font',**font)
fig = plt.figure(figsize=(15,12))
# set height ratios for subplots
gs = gridspec.GridSpec(5,1,height_ratios=[1,1])
ax0 = plt.subplot(gs[0])
line0,= ax0.plot(xnew,uf_sm(xnew),color='r',linewidth=2.5)
plt.title("\\boldmath$u _\phi$",fontsize=30)
ax0.set_yticks([0.0,0.3,0.6])
现在,有了这个字体功能,除了一件事之外,一切都正常工作:bold
不起作用,并且轴号(刻度线旁边)非常模糊,并且在 pdf 上看起来不太好。
我已经看到这里没有关于乳胶的 bold
选项,所以我有什么方法可以
- 仅在标题上使用乳胶(因此我可以将轴上的数字加粗)
或
- 继续使用乳胶但不知何故使用更好的字体来获得“更强”的轴号。
非常感谢您抽出宝贵时间,希望不会那么难。
在标题中不使用乳胶,我可以使用 $$
但我得到这个你:
这就是我想要的