Home > Back-end >  Bold Format Suptitle with Mathematical Expression
Bold Format Suptitle with Mathematical Expression

Time:04-01

This line of code:

plt.suptitle("Observed and Predicted $U_{dec,c}$",x=mid,fontweight='bold')

Produces a suptitle like this:

enter image description here

However, I require the entire string to be in bold, including the mathematical expression, and for various reasons I need to use plt.suptitle, not plt.title. I would be grateful for any advice on how to do this.

CodePudding user response:

There are many options, a simple one is to use \mathbf:

plt.suptitle(r"Observed and Predicted $\mathbf{U_{dec,c}}$", fontweight='bold')

mathbf

You can find more options enter image description here

Here is a list of Latex symbols.

For more questions, you can checkout this.

  • Related