Hi, every one. With follow code:
bbox = dict(
facecolor='white',
edgecolor='black',
boxstyle='round,pad=0.2',
)
fig.text(0.12, 0.2,"Today is cloudy" , bbox=bbox)
I can get a text: “Today is cloudy” in a box, but I’d like to turn “today” into “red” on its own, they’re still in a box as a whole.
If I use the text = r'$\textcolor{red}{Today}$' + ' is cloudy'
,
I will get the error: Unknown symbol: \textcolor, found '\' (at char 0), (line:1, col:1)
So, how to do this?