[英]Bold text for python plot labels
I want to use bold text for the labels of my python plot.我想为我的 python plot 的标签使用粗体文本。 I tried this:我试过这个:
plt.xlabel("$\mathrm{\\mathbf{\delta\\langle r^2\\rangle^{226,A}[fm^2]}}$",fontsize=50,fontweight='bold')
But the output looks weird (see the attached picture).但是 output 看起来很奇怪(见附图)。 The letters get bold, but the numbers and the symbols stay the same.字母变粗,但数字和符号保持不变。 How can I get everything in bold?我怎样才能使所有内容都以粗体显示? Thank you!谢谢!
Using weight
instead of fontweight
.使用weight
而不是fontweight
。
Update:更新:
I found that using \boldsymbol
will work with the Greek letter.我发现使用\boldsymbol
可以处理希腊字母。
\boldsymbol{\mathbf{text}}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.