我正在尝试使用MathText在我的图例中加粗特定的字符串。单词是粗体,但MathText不断删除特定字符。如何让MathText停止删除特定字符?我正在使用的字符串被附加到列表中并用于图例语句中。
例如:
nameedit="Bacillus cereus"
#keeps removing the space
r"$\bf{" +nameedit+ r"}$"
#keeps removing the space
r"$\bf" +nameedit+ r"$"
#space removed and %) removed
r"$\bf" +nameedit+' ('+str(round(70/100*100))+'%)'+ r"$"
#does not print anything
r"$\bf{" +nameedit+' ('+str(round(70/100*100))+'%)'+ r"}$"
#Here is the legend statement
ax.legend(circlist,namelegend,bbox_to_anchor=(1,1),loc=2,fontsize=3.3,title='Top Ten Abundance')