我试图添加一个希腊字母,是黑色字体和斜体字同时。在这种情况下就是大胆的。我不知道这三者是否可能结合在一起。
import matplotlib.pyplot as plt
plt.figure()
plt.plot()
plt.xlabel(r'$ \it{\bf{\mu_{0}}}$ H (mT)',fontsize = 12, fontweight='bold')
plt.show()
发布于 2022-11-02 10:52:13
根据Matplotlib文档,可以将\mathbf
的组合用于斜体、粗体、数学字体和字体的直接定义。
import matplotlib.pyplot as plt
plt.rcParams['mathtext.fontset'] = 'custom'
plt.rcParams['mathtext.bf'] = 'cm:italic:bold'
plt.xlabel(r'$\mathbf{\mu_{0}}$ H (mT)', fontsize=12, fontweight='bold')
plt.show()
https://stackoverflow.com/questions/71319945
复制相似问题